bitboss-ui 0.1.80 → 0.1.82
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/BaseButton/BaseButton.vue.d.ts +5 -2
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +3 -0
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -2
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +3 -0
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +3 -0
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +3 -0
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +3 -0
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -1
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +4 -1
- package/dist/components/BaseRating/BaseRating.vue.d.ts +4 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +16 -2
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +3 -0
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +3 -0
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +3 -0
- package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -1
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +4 -1
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +2 -2
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +5 -2
- package/dist/components/BbAlert/BbAlert.vue.d.ts +3 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +7 -58
- package/dist/components/BbBadge/BbBadge.vue.d.ts +4 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +3 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +3 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -0
- package/dist/components/BbChip/BbChip.vue.d.ts +7 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +4 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +15 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +4 -1
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +6 -7
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -0
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +4 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +4 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +14 -7
- package/dist/components/BbProgress/BbProgress.vue.d.ts +3 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +3 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +1 -6
- package/dist/components/BbRating/BbRating.vue.d.ts +3 -0
- package/dist/components/BbRatio/BbRatio.vue.d.ts +4 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +14 -3
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +5 -2
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +3 -0
- package/dist/components/BbTab/BbTab.vue.d.ts +4 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +258 -295
- package/dist/components/BbTable/types.d.ts +214 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +3 -0
- package/dist/components/BbToast/BbToast.vue.d.ts +3 -0
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -0
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +8 -7
- package/dist/components/BbTree/BbTree.vue.d.ts +9 -1
- package/dist/composables/useItemText.d.ts +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index10.js +2 -2
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +2 -2
- package/dist/index102.js +4 -3
- package/dist/index102.js.map +1 -1
- package/dist/index106.js +1 -1
- package/dist/index108.js +85 -57
- package/dist/index108.js.map +1 -1
- package/dist/index110.js +77 -55
- package/dist/index110.js.map +1 -1
- package/dist/index112.js +5 -5
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index115.js +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index12.js +8 -8
- package/dist/index120.js +1 -1
- package/dist/index121.js +11 -11
- package/dist/index121.js.map +1 -1
- package/dist/index14.js +9 -9
- package/dist/index16.js +3 -3
- package/dist/index18.js +2 -2
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -4
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -2
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +3 -2
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +3 -2
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +4 -3
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +3 -35
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +35 -6
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +6 -350
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +5 -134
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +16 -5
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +1 -1
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +15 -18
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +19 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +18 -184
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +29 -23
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -331
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -2
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +351 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +131 -13
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -16
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +184 -18
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +23 -29
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +369 -8
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +2 -3
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +2 -3
- package/dist/index213.js.map +1 -1
- package/dist/index216.js +73 -53
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -3
- package/dist/index22.js +2 -2
- package/dist/index221.js +223 -10
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +252 -429
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -8
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +428 -82
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +9 -8
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +88 -5
- package/dist/index226.js.map +1 -1
- package/dist/index235.js +2 -69
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -162
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -2
- package/dist/index238.js +2 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +9 -2
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +6 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +162 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +2 -2
- package/dist/index243.js +2 -224
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +68 -257
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +2 -38
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +38 -2
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +2 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +2 -2
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -2
- package/dist/index250.js +2 -2
- package/dist/index251.js +2 -2
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +5 -0
- package/dist/index252.js.map +1 -0
- package/dist/index26.js +3 -3
- package/dist/index26.js.map +1 -1
- package/dist/index28.js +172 -155
- package/dist/index28.js.map +1 -1
- package/dist/index30.js +2 -2
- package/dist/index32.js +2 -2
- package/dist/index34.js +2 -2
- package/dist/index34.js.map +1 -1
- package/dist/index36.js +21 -19
- package/dist/index36.js.map +1 -1
- package/dist/index38.js.map +1 -1
- package/dist/index44.js +1 -1
- package/dist/index44.js.map +1 -1
- package/dist/index46.js +1 -1
- package/dist/index46.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index62.js +168 -137
- package/dist/index62.js.map +1 -1
- package/dist/index64.js +38 -30
- package/dist/index64.js.map +1 -1
- package/dist/index66.js.map +1 -1
- package/dist/index69.js +1 -1
- package/dist/index72.js +1 -1
- package/dist/index74.js.map +1 -1
- package/dist/index76.js +96 -66
- package/dist/index76.js.map +1 -1
- package/dist/index78.js +1 -1
- package/dist/index8.js +2 -2
- package/dist/index82.js +2 -2
- package/dist/index82.js.map +1 -1
- package/dist/index84.js.map +1 -1
- package/dist/index88.js +7 -4
- package/dist/index88.js.map +1 -1
- package/dist/index96.js +2 -2
- package/dist/index96.js.map +1 -1
- package/dist/index98.js +35 -30
- package/dist/index98.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/CommonProps.d.ts +15 -8
- package/package.json +1 -1
package/dist/index236.js
CHANGED
@@ -1,165 +1,5 @@
|
|
1
|
-
|
2
|
-
import { clamp as P } from "./index191.js";
|
3
|
-
import { drop as q } from "./index251.js";
|
4
|
-
import { isNil as R } from "./index117.js";
|
5
|
-
import { isNotNil as w } from "./index123.js";
|
6
|
-
import U from "./index112.js";
|
7
|
-
import "./index151.js";
|
8
|
-
import { wait as L } from "./index119.js";
|
9
|
-
const j = { class: "bb-base-tag__input-container" }, G = ["autocomplete", "autofocus", "disabled", "id", "placeholder", "readonly"], te = /* @__PURE__ */ K({
|
10
|
-
__name: "BaseTag",
|
11
|
-
props: {
|
12
|
-
autocomplete: {},
|
13
|
-
autofocus: {},
|
14
|
-
disabled: { type: Boolean },
|
15
|
-
hasErrors: { type: Boolean },
|
16
|
-
id: {},
|
17
|
-
multiple: { type: Boolean, default: !0 },
|
18
|
-
name: {},
|
19
|
-
placeholder: {},
|
20
|
-
readonly: {},
|
21
|
-
modelValue: {},
|
22
|
-
comma: { type: Boolean },
|
23
|
-
divider: { default: "Enter" }
|
24
|
-
},
|
25
|
-
emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
|
26
|
-
setup(N, { emit: I }) {
|
27
|
-
const a = N, u = I;
|
28
|
-
if (a.multiple && !Array.isArray(a.modelValue))
|
29
|
-
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
30
|
-
const i = s(null), $ = s(null), c = s(null), t = s(""), D = y(() => a.placeholder), o = y(
|
31
|
-
() => [].concat(a.modelValue).filter(w)
|
32
|
-
), h = y(() => {
|
33
|
-
let e = {};
|
34
|
-
return o.value.forEach((n, r) => {
|
35
|
-
e[JSON.stringify(n)] = r;
|
36
|
-
}), {
|
37
|
-
get: (n) => e[JSON.stringify(n)]
|
38
|
-
};
|
39
|
-
}), f = s(!1), l = s(null), A = (e) => {
|
40
|
-
if (u("keyup", e), a.readonly || a.disabled) {
|
41
|
-
e.preventDefault();
|
42
|
-
return;
|
43
|
-
}
|
44
|
-
if (e.key === a.divider) {
|
45
|
-
if (t.value[t.value.length - 1] === e.key && (t.value = t.value.slice(0, t.value.length - 1)), !t.value)
|
46
|
-
return;
|
47
|
-
l.value = null;
|
48
|
-
const n = h.value.get(t.value);
|
49
|
-
R(n) ? F(t.value) : u("duplicate", t.value), t.value = "";
|
50
|
-
} else if (e.key === "ArrowLeft")
|
51
|
-
l.value === null ? l.value = o.value.length - 1 : l.value === 0 ? l.value = null : l.value--;
|
52
|
-
else if (e.key === "ArrowRight")
|
53
|
-
l.value === null ? l.value = 1 : l.value === o.value.length - 1 ? l.value = null : l.value++;
|
54
|
-
else if (e.key === "Backspace") {
|
55
|
-
if (t.value)
|
56
|
-
return;
|
57
|
-
w(l.value) ? (b(l.value), l.value = P(
|
58
|
-
l.value,
|
59
|
-
0,
|
60
|
-
o.value.length - 2
|
61
|
-
), o.value.length === 1 && (l.value = null)) : l.value = o.value.length - 1;
|
62
|
-
} else
|
63
|
-
(e.key === "Tab" || e.key === "Escape") && (l.value = null);
|
64
|
-
}, F = (e) => {
|
65
|
-
a.multiple ? u("update:modelValue", a.modelValue.concat(e)) : u("update:modelValue", e);
|
66
|
-
}, b = (e) => {
|
67
|
-
if (typeof e == "number")
|
68
|
-
a.multiple ? u("update:modelValue", q(a.modelValue, 1, e)) : u("update:modelValue", null);
|
69
|
-
else {
|
70
|
-
const n = h.value.get(t.value);
|
71
|
-
b(n);
|
72
|
-
}
|
73
|
-
}, M = (e) => {
|
74
|
-
u("focus", e), f.value = !0, document.addEventListener("click", _), document.addEventListener("focusin", V), c.value instanceof HTMLInputElement && c.value.select();
|
75
|
-
}, O = (e) => {
|
76
|
-
u("click", e), !(a.disabled || a.readonly) && c.value instanceof HTMLElement && c.value.focus();
|
77
|
-
}, _ = (e) => {
|
78
|
-
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
79
|
-
u("inactive"), document.removeEventListener("click", _), f.value = !1, a.multiple && L(500).then(() => {
|
80
|
-
t.value = "";
|
81
|
-
});
|
82
|
-
return;
|
83
|
-
}
|
84
|
-
}, V = (e) => {
|
85
|
-
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
86
|
-
u("inactive"), document.removeEventListener("focusin", V), f.value = !1, a.multiple && L(500).then(() => {
|
87
|
-
t.value = "";
|
88
|
-
});
|
89
|
-
return;
|
90
|
-
}
|
91
|
-
}, T = {
|
92
|
-
onBlur: (e) => u("blur", e),
|
93
|
-
onChange: (e) => u("change", e),
|
94
|
-
onKeydown: (e) => {
|
95
|
-
e.key === "Enter" && a.divider === "Enter" && e.preventDefault(), u("keydown", e);
|
96
|
-
},
|
97
|
-
onInput: (e) => u("input", e)
|
98
|
-
};
|
99
|
-
return (e, n) => (p(), m("span", {
|
100
|
-
class: g({
|
101
|
-
"bb-base-tag": !0,
|
102
|
-
"bb-base-tag--active": f.value,
|
103
|
-
"bb-base-tag--disabled": e.disabled,
|
104
|
-
"bb-base-tag--errors": e.hasErrors,
|
105
|
-
"bb-base-tag--readonly": e.readonly
|
106
|
-
}),
|
107
|
-
onClick: O,
|
108
|
-
ref_key: "outerContainer",
|
109
|
-
ref: i
|
110
|
-
}, [
|
111
|
-
v(e.$slots, "prepend-outer"),
|
112
|
-
k("span", {
|
113
|
-
class: "bb-base-tag__inner-container",
|
114
|
-
ref_key: "innerContainer",
|
115
|
-
ref: $
|
116
|
-
}, [
|
117
|
-
v(e.$slots, "prepend"),
|
118
|
-
k("span", j, [
|
119
|
-
e.comma ? (p(!0), m(E, { key: 0 }, C(o.value, (r, d) => (p(), m("span", {
|
120
|
-
class: g({
|
121
|
-
"bb-base-tag__selected": !0,
|
122
|
-
"bb-base-tag__selected--comma": !0,
|
123
|
-
"bb-base-tag__selected--focused": d === l.value
|
124
|
-
}),
|
125
|
-
key: r
|
126
|
-
}, B(r) + B(d < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), m(E, { key: 1 }, C(o.value, (r, d) => (p(), S(U, {
|
127
|
-
class: g({
|
128
|
-
"bb-base-tag__selected": !0,
|
129
|
-
"bb-base-tag__selected--chip": !0,
|
130
|
-
"bb-base-tag__selected--focused": d === l.value
|
131
|
-
}),
|
132
|
-
clearable: !0,
|
133
|
-
key: r,
|
134
|
-
text: r,
|
135
|
-
"onClick:clear": (Q) => b(d)
|
136
|
-
}, null, 8, ["class", "text", "onClick:clear"]))), 128)),
|
137
|
-
z(k("input", H({
|
138
|
-
autocomplete: e.autocomplete,
|
139
|
-
autofocus: e.autofocus,
|
140
|
-
class: "bb-base-tag__text-input",
|
141
|
-
disabled: e.disabled,
|
142
|
-
id: e.id,
|
143
|
-
placeholder: D.value,
|
144
|
-
readonly: e.readonly,
|
145
|
-
type: "text",
|
146
|
-
onKeyup: A,
|
147
|
-
onFocus: M
|
148
|
-
}, T, {
|
149
|
-
"onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
|
150
|
-
ref_key: "input",
|
151
|
-
ref: c
|
152
|
-
}), null, 16, G), [
|
153
|
-
[J, t.value]
|
154
|
-
])
|
155
|
-
]),
|
156
|
-
v(e.$slots, "append")
|
157
|
-
], 512),
|
158
|
-
v(e.$slots, "append-outer")
|
159
|
-
], 2));
|
160
|
-
}
|
161
|
-
});
|
1
|
+
var e = { exports: {} };
|
162
2
|
export {
|
163
|
-
|
3
|
+
e as __module
|
164
4
|
};
|
165
5
|
//# sourceMappingURL=index236.js.map
|
package/dist/index236.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index236.js","sources":["../src/components/BaseTag/BaseTag.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createBlock as _createBlock, vModelDynamic as _vModelDynamic, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-tag__input-container\" }\nconst _hoisted_2 = [\"autocomplete\", \"autofocus\", \"disabled\", \"id\", \"placeholder\", \"readonly\"]\n\nimport { clamp } from \"@/utilities/functions/clamp\";\nimport { computed, ref } from \"vue\";\nimport { drop } from \"@/utilities/functions/drop\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport { isNotNil } from \"@/utilities/functions/isNotNil\";\nimport BbChip from \"../BbChip/BbChip.vue\";\nimport type { CommonProps, GenericModelValue } from \"@/types/CommonProps\";\nimport { wait } from \"@/utilities/functions/wait\";\n\nexport type BaseTagProps = Pick<\n CommonProps,\n | \"autocomplete\"\n | \"autofocus\"\n | \"disabled\"\n | \"hasErrors\"\n | \"id\"\n | \"multiple\"\n | \"name\"\n | \"placeholder\"\n | \"readonly\"\n> &\n GenericModelValue & {\n /**\n * Sets the display model for selected values to a list\n * of comma separated string. In this mode the user\n * cannot deselect an option by pressing the close button.\n */\n comma?: boolean;\n /**\n * The divider key used to separate values from one another. By default it is \"Enter\"\n */\n divider?: KeyboardEvent[\"key\"];\n };\n\nexport type BaseTagEvents = {\n (e: \"blur\", event: FocusEvent): void;\n (e: \"change\", event: Event): void;\n (e: \"click\", event: MouseEvent): void;\n (e: \"duplicate\", string: string): void;\n (e: \"focus\", event: FocusEvent): void;\n (e: \"inactive\"): void;\n (e: \"input\", event: Event): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n (e: \"keyup\", event: KeyboardEvent): void;\n (e: \"update:modelValue\", value: any): void;\n};\n\nexport type BaseTagSlots = {\n \"prepend-outer\"?: (props: {}) => any;\n prepend?: (props: {}) => any;\n append?: (props: {}) => any;\n \"append-outer\"?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTag',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n multiple: { type: Boolean, default: true },\n name: {},\n placeholder: {},\n readonly: {},\n modelValue: {},\n comma: { type: Boolean },\n divider: { default: \"Enter\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"duplicate\", \"focus\", \"inactive\", \"input\", \"keydown\", \"keyup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n throw new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>(\"\");\nconst computedPlaceholder = computed(() => {\n return props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n [].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n let map: { [key: string]: number } = {};\n modelValueNormalized.value.forEach((value: any, index: number) => {\n map[JSON.stringify(value)] = index;\n });\n return {\n get: (value: any) => map[JSON.stringify(value)],\n };\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 phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n emit(\"keyup\", event);\n if (props.readonly || props.disabled) {\n event.preventDefault();\n return;\n }\n if (event.key === props.divider) {\n if (query.value[query.value.length - 1] === event.key) {\n query.value = query.value.slice(0, query.value.length - 1);\n }\n if (!query.value) return;\n focusedIndex.value = null;\n const currentIndex = modelValueIndexed.value.get(query.value);\n if (isNil(currentIndex)) selectValue(query.value);\n else emit(\"duplicate\", query.value);\n query.value = \"\";\n } else if (event.key === \"ArrowLeft\") {\n if (focusedIndex.value === null)\n focusedIndex.value = modelValueNormalized.value.length - 1;\n else if (focusedIndex.value === 0) focusedIndex.value = null;\n else focusedIndex.value--;\n } else if (event.key === \"ArrowRight\") {\n if (focusedIndex.value === null) focusedIndex.value = 1;\n else if (focusedIndex.value === modelValueNormalized.value.length - 1)\n focusedIndex.value = null;\n else focusedIndex.value++;\n } else if (event.key === \"Backspace\") {\n if (query.value) return;\n if (isNotNil(focusedIndex.value)) {\n removeValue(focusedIndex.value);\n focusedIndex.value = clamp(\n focusedIndex.value,\n 0,\n modelValueNormalized.value.length - 2\n );\n if (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n } else focusedIndex.value = modelValueNormalized.value.length - 1;\n } else if (event.key === \"Tab\" || event.key === \"Escape\") {\n focusedIndex.value = null;\n }\n};\n\nconst selectValue = (text: string) => {\n if (props.multiple) emit(\"update:modelValue\", props.modelValue.concat(text));\n else emit(\"update:modelValue\", text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n if (typeof indexOrString === \"number\") {\n if (props.multiple)\n emit(\"update:modelValue\", drop(props.modelValue, 1, indexOrString));\n else emit(\"update:modelValue\", null);\n } else {\n const currentIndex = modelValueIndexed.value.get(query.value);\n removeValue(currentIndex);\n }\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n active.value = true;\n document.addEventListener(\"click\", onClickOutside);\n document.addEventListener(\"focusin\", onFocusOutside);\n if (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n emit(\"click\", event);\n if (props.disabled || props.readonly) return;\n if (input.value instanceof HTMLElement) {\n input.value.focus();\n }\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n if (event.target instanceof Node) {\n if (outerContainer.value) {\n if (!outerContainer.value.contains(event.target)) {\n emit(\"inactive\");\n document.removeEventListener(\"click\", onClickOutside);\n active.value = false;\n if (props.multiple)\n wait(500).then(() => {\n query.value = \"\";\n });\n return;\n }\n }\n }\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n if (event.target instanceof Node) {\n if (outerContainer.value) {\n if (!outerContainer.value.contains(event.target)) {\n emit(\"inactive\");\n document.removeEventListener(\"focusin\", onFocusOutside);\n active.value = false;\n if (props.multiple)\n wait(500).then(() => {\n query.value = \"\";\n });\n return;\n }\n }\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === \"Enter\" && props.divider === 'Enter') {\n event.preventDefault();\n }\n emit(\"keydown\", event);\n },\n onInput: (event: Event) => emit(\"input\", event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass({\n 'bb-base-tag': true,\n 'bb-base-tag--active': active.value,\n 'bb-base-tag--disabled': _ctx.disabled,\n 'bb-base-tag--errors': _ctx.hasErrors,\n 'bb-base-tag--readonly': _ctx.readonly,\n }),\n onClick: onOuterContainerClick,\n ref_key: \"outerContainer\",\n ref: outerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", {\n class: \"bb-base-tag__inner-container\",\n ref_key: \"innerContainer\",\n ref: innerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.comma)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass({\n 'bb-base-tag__selected': true,\n 'bb-base-tag__selected--comma': true,\n 'bb-base-tag__selected--focused': index === focusedIndex.value,\n }),\n key: option\n }, _toDisplayString(option) + _toDisplayString(index < modelValueNormalized.value.length - 1 ? \",\" : \"\"), 3))\n }), 128))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createBlock(BbChip, {\n class: _normalizeClass({\n 'bb-base-tag__selected': true,\n 'bb-base-tag__selected--chip': true,\n 'bb-base-tag__selected--focused': index === focusedIndex.value,\n }),\n clearable: true,\n key: option,\n text: option,\n \"onClick:clear\": ($event: any) => (removeValue(index))\n }, null, 8, [\"class\", \"text\", \"onClick:clear\"]))\n }), 128)),\n _withDirectives(_createElementVNode(\"input\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-tag__text-input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n placeholder: computedPlaceholder.value,\n readonly: _ctx.readonly,\n type: 'text',\n onKeyup: onInputKeyup,\n onFocus: onInputFocus\n }, eventListeners, {\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((query).value = $event)),\n ref_key: \"input\",\n ref: input\n }), null, 16, _hoisted_2), [\n [_vModelDynamic, query.value]\n ])\n ]),\n _renderSlot(_ctx.$slots, \"append\")\n ], 512),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_Fragment","_renderList","option","_toDisplayString","_createBlock","BbChip","$event","_withDirectives","_mergeProps","_vModelDynamic"],"mappings":";;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,kCACtBC,IAAa,CAAC,gBAAgB,aAAa,YAAY,MAAM,eAAe,UAAU,GAyDhEC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,UAAU,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IACzC,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,OAAO,EAAE,MAAM,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EAAaC,GAAQ;AAAA,YACzC,OAAOR,EAAgB;AAAA,cACzB,yBAAyB;AAAA,cACzB,+BAA+B;AAAA,cAC/B,kCAAkCvB,MAAUE,EAAa;AAAA,YAAA,CAC1D;AAAA,YACG,WAAW;AAAA,YACX,KAAK0B;AAAA,YACL,MAAMA;AAAA,YACN,iBAAiB,CAACI,MAAiBxB,EAAYR,CAAK;AAAA,UAAA,GACnD,MAAM,GAAG,CAAC,SAAS,QAAQ,eAAe,CAAC,EAC/C,GAAG,GAAG;AAAA,UACXiC,EAAgBR,EAAoB,SAASS,EAAY;AAAA,YACvD,cAAcf,EAAK;AAAA,YACnB,WAAWA,EAAK;AAAA,YAChB,OAAO;AAAA,YACP,UAAUA,EAAK;AAAA,YACf,IAAIA,EAAK;AAAA,YACT,aAAa1B,EAAoB;AAAA,YACjC,UAAU0B,EAAK;AAAA,YACf,MAAM;AAAA,YACN,SAAShB;AAAA,YACT,SAASU;AAAA,aACRK,GAAgB;AAAA,YACjB,uBAAuBE,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAACY,MAAkBxC,EAAO,QAAQwC;AAAA,YACnF,SAAS;AAAA,YACT,KAAKzC;AAAA,UACN,CAAA,GAAG,MAAM,IAAIV,CAAU,GAAG;AAAA,YACzB,CAACsD,GAAgB3C,EAAM,KAAK;AAAA,UAAA,CAC7B;AAAA,QAAA,CACF;AAAA,QACDgC,EAAYL,EAAK,QAAQ,QAAQ;AAAA,SAChC,GAAG;AAAA,MACNK,EAAYL,EAAK,QAAQ,cAAc;AAAA,OACtC,CAAC;AAAA,EAEN;AAEA,CAAC;"}
|
1
|
+
{"version":3,"file":"index236.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index237.js
CHANGED
package/dist/index238.js
CHANGED
package/dist/index238.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index238.js","sources":[
|
1
|
+
{"version":3,"file":"index238.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index239.js
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
-
|
1
|
+
import { getCurrentInstance as o, computed as r } from "vue";
|
2
|
+
function u() {
|
3
|
+
const t = o();
|
4
|
+
return r(() => {
|
5
|
+
var e;
|
6
|
+
return (e = t == null ? void 0 : t.proxy) == null ? void 0 : e.$route;
|
7
|
+
});
|
8
|
+
}
|
2
9
|
export {
|
3
|
-
|
10
|
+
u as useRoute
|
4
11
|
};
|
5
12
|
//# sourceMappingURL=index239.js.map
|
package/dist/index239.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index239.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
1
|
+
{"version":3,"file":"index239.js","sources":["../src/composables/useRoute.ts"],"sourcesContent":["import { computed, getCurrentInstance, type Ref } from \"vue\";\nimport type { RouteLocationNormalizedLoaded } from \"vue-router\";\n\nexport function useRoute(): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance();\n\n return computed(() => vm?.proxy?.$route);\n}\n"],"names":["useRoute","vm","getCurrentInstance","computed","_a"],"mappings":";AAGO,SAASA,IAA2D;AACzE,QAAMC,IAAKC;AAEX,SAAOC,EAAS,MAAM;;AAAA,YAAAC,IAAAH,KAAA,gBAAAA,EAAI,UAAJ,gBAAAG,EAAW;AAAA,GAAM;AACzC;"}
|
package/dist/index24.js
CHANGED
@@ -25,9 +25,9 @@ const H = { class: "bb-base-radio-group__container" }, I = {
|
|
25
25
|
itemText: {},
|
26
26
|
itemValue: {},
|
27
27
|
loadingText: { default: "Caricamento..." },
|
28
|
+
matchStrategy: { default: "string" },
|
28
29
|
modelValueDebounceTime: { default: 0 },
|
29
30
|
noDataText: { default: "Nessun elemento da visualizzare" },
|
30
|
-
matchStrategy: { default: "string" },
|
31
31
|
items: { type: [Array, Function], default: () => [] },
|
32
32
|
modelValue: {},
|
33
33
|
direction: { default: "horizontal" }
|
package/dist/index24.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index24.js","sources":["../src/components/BaseRadioGroup/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-radio-group__container\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"bb-base-radio-group__loading-container\"\n}\nconst _hoisted_3 = {\n key: 1,\n class: \"bb-base-select__no-data-container\"\n}\n\nimport { ref, toRef } from \"vue\";\nimport { useOptions } from \"@/index\";\nimport BaseRadio from \"../BaseRadio/BaseRadio.vue\";\nimport type {\n BaseRadioEvents,\n SlotAttributes,\n} from \"../BaseRadio/BaseRadio.vue\";\nimport type { BaseRadioProps } from \"../BaseRadio/BaseRadio.vue\";\nimport type {\n CommonProps,\n GenericModelValue,\n OptionItems,\n} from \"@/types/CommonProps\";\nimport type { Simplify } from \"@/types/Simplify\";\n\nexport type BaseRadioGroupProps = Pick<\n BaseRadioProps,\n \"autofocus\" | \"color\" | \"disabled\" | \"hasErrors\" | \"id\" | \"name\" | \"readonly\"\n> &\n Pick<\n CommonProps,\n | \"dependencies\"\n | \"depsDebounceTime\"\n | \"enforceCoherence\"\n | \"hideLabel\"\n | \"itemText\"\n | \"itemValue\"\n | \"loadingText\"\n | \"modelValueDebounceTime\"\n | \"noDataText\"\n | \"matchStrategy\"\n > &\n OptionItems &\n GenericModelValue & {\n /**\n * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n */\n direction?: \"horizontal\" | \"vertical\";\n };\n\nexport type BaseRadioGroupEvents = BaseRadioEvents & {\n (e: \"inactive\"): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseRadioGroup',\n props: {\n autofocus: {},\n color: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n readonly: {},\n dependencies: {},\n depsDebounceTime: { default: 0 },\n enforceCoherence: { type: Boolean },\n hideLabel: { type: Boolean },\n itemText: {},\n itemValue: {},\n loadingText: { default: \"Caricamento...\" },\n modelValueDebounceTime: { default: 0 },\n noDataText: { default: \"Nessun elemento da visualizzare\" },\n matchStrategy: { default: \"string\" },\n items: { type: [Array, Function], default: () => [] },\n modelValue: {},\n direction: { default: \"horizontal\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\", \"inactive\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { loading, options } = useOptions({\n dependencies: toRef(() => props.dependencies),\n depsDebounceTime: props.depsDebounceTime,\n disabled: toRef(() => props.disabled),\n emitter: (value) => emit(\"update:modelValue\", value),\n enforceCoherence: toRef(() => props.enforceCoherence),\n id: props.id,\n immediate: true,\n initialItems: toRef(() => props.items),\n itemText: props.itemText,\n itemValue: props.itemValue,\n matchStrategy: props.matchStrategy,\n modelValue: toRef(() => props.modelValue),\n modelValueDebounceTime: props.modelValueDebounceTime,\n multiple: false,\n});\n\nconst onFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n if (!active.value) {\n document.addEventListener(\"focusin\", onDocumentFocus, { passive: true });\n document.addEventListener(\"click\", onDocumentClick, { passive: true });\n active.value = true;\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus,\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"bb-base-radio-group\", {\n 'bb-base-radio-group--errors': _ctx.hasErrors,\n 'bb-base-radio-group--horizontal': _ctx.direction === 'horizontal',\n 'bb-base-radio-group--vertical': _ctx.direction === 'vertical',\n }]),\n ref_key: \"container\",\n ref: container\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n (!_unref(options).length && _unref(loading))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, 'loading', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.loadingText), 1)\n ])\n ]))\n : (!_unref(options).length)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, 'no-data', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.noDataText), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(options), (option, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: option?.id || index\n }, [\n _renderSlot(_ctx.$slots, \"option:prepend\", {\n item: option.original\n }),\n _createElementVNode(\"label\", {\n class: _normalizeClass([\"bb-base-radio-group-option\", { 'bb-base-radio-selected': option.selected }])\n }, [\n _createVNode(BaseRadio, _mergeProps({\n autofocus: _ctx.autofocus && !index,\n checked: option.selected,\n color: _ctx.color,\n disabled: option.disabled,\n \"has-errors\": _ctx.hasErrors,\n id: option.id,\n \"model-value\": props.modelValue,\n name: _ctx.name,\n readonly: _ctx.readonly,\n value: option.value\n }, eventListeners), _createSlots({ _: 2 }, [\n (_ctx.$slots.icon)\n ? {\n name: \"icon\",\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps({\n item: option.original,\n text: option.text\n }, data))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"has-errors\", \"id\", \"model-value\", \"name\", \"readonly\", \"value\"]),\n _createElementVNode(\"span\", {\n class: _normalizeClass({\n 'bb-base-radio-group-option__text': true,\n 'bb-base-radio-group-option__text--hidden': _ctx.hideLabel,\n })\n }, [\n _renderSlot(_ctx.$slots, \"label\", {\n text: option.text,\n item: option.original,\n checked: option.selected\n }, () => [\n _createTextVNode(_toDisplayString(option.text), 1)\n ])\n ], 2)\n ], 2),\n _renderSlot(_ctx.$slots, \"option:append\", {\n item: option.original\n })\n ], 64))\n }), 128)),\n _renderSlot(_ctx.$slots, \"append\")\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","__emit","props","emit","container","ref","active","loading","options","useOptions","toRef","value","eventListeners","event","onDocumentFocus","onDocumentClick","_a","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_unref","_createTextVNode","_toDisplayString","_createCommentVNode","_Fragment","_renderList","option","index","_createVNode","BaseRadio","_mergeProps","_createSlots","_withCtx","data"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,OAAO,oCACtBC,IAAa;AAAA,EACjB,KAAK;A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f,MAAM;AAAA,gBACPL,EAAiBC,EAAiBI,EAAO,IAAI,GAAG,CAAC;AAAA,cAAA,CAClD;AAAA,eACA,CAAC;AAAA,aACH,CAAC;AAAA,UACJP,EAAYN,EAAK,QAAQ,iBAAiB;AAAA,YACxC,MAAMa,EAAO;AAAA,UAAA,CACd;AAAA,WACA,EAAE,EACN,GAAG,GAAG;AAAA,QACPP,EAAYN,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
|
1
|
+
{"version":3,"file":"index24.js","sources":["../src/components/BaseRadioGroup/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-radio-group__container\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"bb-base-radio-group__loading-container\"\n}\nconst _hoisted_3 = {\n key: 1,\n class: \"bb-base-select__no-data-container\"\n}\n\nimport { ref, toRef } from \"vue\";\nimport { useOptions } from \"@/index\";\nimport BaseRadio from \"../BaseRadio/BaseRadio.vue\";\nimport type {\n BaseRadioEvents,\n SlotAttributes,\n} from \"../BaseRadio/BaseRadio.vue\";\nimport type { BaseRadioProps } from \"../BaseRadio/BaseRadio.vue\";\nimport type {\n CommonProps,\n GenericModelValue,\n OptionItems,\n} from \"@/types/CommonProps\";\nimport type { Simplify } from \"@/types/Simplify\";\n\nexport type BaseRadioGroupProps = Pick<\n BaseRadioProps,\n \"autofocus\" | \"color\" | \"disabled\" | \"hasErrors\" | \"id\" | \"name\" | \"readonly\"\n> &\n Pick<\n CommonProps,\n | \"dependencies\"\n | \"depsDebounceTime\"\n | \"enforceCoherence\"\n | \"hideLabel\"\n | \"itemText\"\n | \"itemValue\"\n | \"loadingText\"\n | \"matchStrategy\"\n | \"modelValueDebounceTime\"\n | \"noDataText\"\n > &\n OptionItems &\n Required<GenericModelValue> & {\n /**\n * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n */\n direction?: \"horizontal\" | \"vertical\";\n };\n\nexport type BaseRadioGroupEvents = BaseRadioEvents & {\n (e: \"inactive\"): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseRadioGroup',\n props: {\n autofocus: {},\n color: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n readonly: {},\n dependencies: {},\n depsDebounceTime: { default: 0 },\n enforceCoherence: { type: Boolean },\n hideLabel: { type: Boolean },\n itemText: {},\n itemValue: {},\n loadingText: { default: \"Caricamento...\" },\n matchStrategy: { default: \"string\" },\n modelValueDebounceTime: { default: 0 },\n noDataText: { default: \"Nessun elemento da visualizzare\" },\n items: { type: [Array, Function], default: () => [] },\n modelValue: {},\n direction: { default: \"horizontal\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\", \"inactive\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { loading, options } = useOptions({\n dependencies: toRef(() => props.dependencies),\n depsDebounceTime: props.depsDebounceTime,\n disabled: toRef(() => props.disabled),\n emitter: (value) => emit(\"update:modelValue\", value),\n enforceCoherence: toRef(() => props.enforceCoherence),\n id: props.id,\n immediate: true,\n initialItems: toRef(() => props.items),\n itemText: props.itemText,\n itemValue: props.itemValue,\n matchStrategy: props.matchStrategy,\n modelValue: toRef(() => props.modelValue),\n modelValueDebounceTime: props.modelValueDebounceTime,\n multiple: false,\n});\n\nconst onFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n if (!active.value) {\n document.addEventListener(\"focusin\", onDocumentFocus, { passive: true });\n document.addEventListener(\"click\", onDocumentClick, { passive: true });\n active.value = true;\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus,\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"bb-base-radio-group\", {\n 'bb-base-radio-group--errors': _ctx.hasErrors,\n 'bb-base-radio-group--horizontal': _ctx.direction === 'horizontal',\n 'bb-base-radio-group--vertical': _ctx.direction === 'vertical',\n }]),\n ref_key: \"container\",\n ref: container\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n (!_unref(options).length && _unref(loading))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, 'loading', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.loadingText), 1)\n ])\n ]))\n : (!_unref(options).length)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, 'no-data', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.noDataText), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(options), (option, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: option?.id || index\n }, [\n _renderSlot(_ctx.$slots, \"option:prepend\", {\n item: option.original\n }),\n _createElementVNode(\"label\", {\n class: _normalizeClass([\"bb-base-radio-group-option\", { 'bb-base-radio-selected': option.selected }])\n }, [\n _createVNode(BaseRadio, _mergeProps({\n autofocus: _ctx.autofocus && !index,\n checked: option.selected,\n color: _ctx.color,\n disabled: option.disabled,\n \"has-errors\": _ctx.hasErrors,\n id: option.id,\n \"model-value\": props.modelValue,\n name: _ctx.name,\n readonly: _ctx.readonly,\n value: option.value\n }, eventListeners), _createSlots({ _: 2 }, [\n (_ctx.$slots.icon)\n ? {\n name: \"icon\",\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps({\n item: option.original,\n text: option.text\n }, data))\n ]),\n key: \"0\"\n }\n : undefined\n ]), 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"has-errors\", \"id\", \"model-value\", \"name\", \"readonly\", \"value\"]),\n _createElementVNode(\"span\", {\n class: _normalizeClass({\n 'bb-base-radio-group-option__text': true,\n 'bb-base-radio-group-option__text--hidden': _ctx.hideLabel,\n })\n }, [\n _renderSlot(_ctx.$slots, \"label\", {\n text: option.text,\n item: option.original,\n checked: option.selected\n }, () => [\n _createTextVNode(_toDisplayString(option.text), 1)\n ])\n ], 2)\n ], 2),\n _renderSlot(_ctx.$slots, \"option:append\", {\n item: option.original\n })\n ], 64))\n }), 128)),\n _renderSlot(_ctx.$slots, \"append\")\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","__emit","props","emit","container","ref","active","loading","options","useOptions","toRef","value","eventListeners","event","onDocumentFocus","onDocumentClick","_a","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_unref","_createTextVNode","_toDisplayString","_createCommentVNode","_Fragment","_renderList","option","index","_createVNode","BaseRadio","_mergeProps","_createSlots","_withCtx","data"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,OAAO,oCACtBC,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GA8C4BC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,OAAO,CAAC;AAAA,IACR,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,UAAU,CAAC;AAAA,IACX,cAAc,CAAC;AAAA,IACf,kBAAkB,EAAE,SAAS,EAAE;AAAA,IAC/B,kBAAkB,EAAE,MAAM,QAAQ;AAAA,IAClC,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,UAAU,CAAC;AAAA,IACX,WAAW,CAAC;AAAA,IACZ,aAAa,EAAE,SAAS,iBAAiB;AAAA,IACzC,eAAe,EAAE,SAAS,SAAS;AAAA,IACnC,wBAAwB,EAAE,SAAS,EAAE;AAAA,IACrC,YAAY,EAAE,SAAS,kCAAkC;AAAA,IACzD,OAAO,EAAE,MAAM,CAAC,OAAO,QAAQ,GAAG,SAAS,MAAM,GAAG;AAAA,IACpD,YAAY,CAAC;AAAA,IACb,WAAW,EAAE,SAAS,aAAa;AAAA,EACrC;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,qBAAq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AAa,WAAW,SAAS,YAAY,cAAc,MAAM,eAAe,QAAQ,YAAY,OAAO,CAAC;AAAA,YACvHf,EAAoB,QAAQ;AAAA,cAC1B,OAAOD,EAAgB;AAAA,gBACvB,oCAAoC;AAAA,gBACpC,4CAA4CJ,EAAK;AAAA,cAAA,CAClD;AAAA,YAAA,GACE;AAAA,cACDM,EAAYN,EAAK,QAAQ,SAAS;AAAA,gBAChC,MAAMa,EAAO;AAAA,gBACb,MAAMA,EAAO;AAAA,gBACb,SAASA,EAAO;AAAA,cAAA,GACf,MAAM;AAAA,gBACPL,EAAiBC,EAAiBI,EAAO,IAAI,GAAG,CAAC;AAAA,cAAA,CAClD;AAAA,eACA,CAAC;AAAA,aACH,CAAC;AAAA,UACJP,EAAYN,EAAK,QAAQ,iBAAiB;AAAA,YACxC,MAAMa,EAAO;AAAA,UAAA,CACd;AAAA,WACA,EAAE,EACN,GAAG,GAAG;AAAA,QACPP,EAAYN,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
|
package/dist/index240.js
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
|
1
|
+
import { getCurrentInstance as e } from "vue";
|
2
|
+
function n() {
|
3
|
+
var r, t;
|
4
|
+
return (t = (r = e()) == null ? void 0 : r.proxy) == null ? void 0 : t.$router;
|
5
|
+
}
|
2
6
|
export {
|
3
|
-
|
7
|
+
n as useRouter
|
4
8
|
};
|
5
9
|
//# sourceMappingURL=index240.js.map
|
package/dist/index240.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index240.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
1
|
+
{"version":3,"file":"index240.js","sources":["../src/composables/useRouter.ts"],"sourcesContent":["import { getCurrentInstance } from \"vue\";\nimport type { Router } from \"vue-router\";\n\nexport function useRouter (): Router | undefined {\n return getCurrentInstance()?.proxy?.$router\n }"],"names":["useRouter","_b","_a","getCurrentInstance"],"mappings":";AAGO,SAASA,IAAiC;;AACtC,UAAAC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,gBAAAD,EAA6B;AACtC;"}
|
package/dist/index241.js
CHANGED
@@ -1,5 +1,165 @@
|
|
1
|
-
|
1
|
+
import { defineComponent as K, ref as s, computed as y, openBlock as p, createElementBlock as m, normalizeClass as g, renderSlot as v, createElementVNode as k, Fragment as E, renderList as C, toDisplayString as B, createBlock as S, withDirectives as z, mergeProps as H, vModelDynamic as J } from "vue";
|
2
|
+
import { clamp as P } from "./index190.js";
|
3
|
+
import { drop as q } from "./index252.js";
|
4
|
+
import { isNil as R } from "./index117.js";
|
5
|
+
import { isNotNil as w } from "./index123.js";
|
6
|
+
import U from "./index112.js";
|
7
|
+
import "./index151.js";
|
8
|
+
import { wait as L } from "./index119.js";
|
9
|
+
const j = { class: "bb-base-tag__input-container" }, G = ["autocomplete", "autofocus", "disabled", "id", "placeholder", "readonly"], te = /* @__PURE__ */ K({
|
10
|
+
__name: "BaseTag",
|
11
|
+
props: {
|
12
|
+
autocomplete: {},
|
13
|
+
autofocus: {},
|
14
|
+
disabled: { type: Boolean },
|
15
|
+
hasErrors: { type: Boolean },
|
16
|
+
id: {},
|
17
|
+
multiple: { type: Boolean, default: !0 },
|
18
|
+
name: {},
|
19
|
+
placeholder: {},
|
20
|
+
readonly: {},
|
21
|
+
modelValue: {},
|
22
|
+
comma: { type: Boolean },
|
23
|
+
divider: { default: "Enter" }
|
24
|
+
},
|
25
|
+
emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
|
26
|
+
setup(N, { emit: I }) {
|
27
|
+
const a = N, u = I;
|
28
|
+
if (a.multiple && !Array.isArray(a.modelValue))
|
29
|
+
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
30
|
+
const i = s(null), $ = s(null), c = s(null), t = s(""), D = y(() => a.placeholder), o = y(
|
31
|
+
() => [].concat(a.modelValue).filter(w)
|
32
|
+
), h = y(() => {
|
33
|
+
let e = {};
|
34
|
+
return o.value.forEach((n, r) => {
|
35
|
+
e[JSON.stringify(n)] = r;
|
36
|
+
}), {
|
37
|
+
get: (n) => e[JSON.stringify(n)]
|
38
|
+
};
|
39
|
+
}), f = s(!1), l = s(null), A = (e) => {
|
40
|
+
if (u("keyup", e), a.readonly || a.disabled) {
|
41
|
+
e.preventDefault();
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
if (e.key === a.divider) {
|
45
|
+
if (t.value[t.value.length - 1] === e.key && (t.value = t.value.slice(0, t.value.length - 1)), !t.value)
|
46
|
+
return;
|
47
|
+
l.value = null;
|
48
|
+
const n = h.value.get(t.value);
|
49
|
+
R(n) ? F(t.value) : u("duplicate", t.value), t.value = "";
|
50
|
+
} else if (e.key === "ArrowLeft")
|
51
|
+
l.value === null ? l.value = o.value.length - 1 : l.value === 0 ? l.value = null : l.value--;
|
52
|
+
else if (e.key === "ArrowRight")
|
53
|
+
l.value === null ? l.value = 1 : l.value === o.value.length - 1 ? l.value = null : l.value++;
|
54
|
+
else if (e.key === "Backspace") {
|
55
|
+
if (t.value)
|
56
|
+
return;
|
57
|
+
w(l.value) ? (b(l.value), l.value = P(
|
58
|
+
l.value,
|
59
|
+
0,
|
60
|
+
o.value.length - 2
|
61
|
+
), o.value.length === 1 && (l.value = null)) : l.value = o.value.length - 1;
|
62
|
+
} else
|
63
|
+
(e.key === "Tab" || e.key === "Escape") && (l.value = null);
|
64
|
+
}, F = (e) => {
|
65
|
+
a.multiple ? u("update:modelValue", a.modelValue.concat(e)) : u("update:modelValue", e);
|
66
|
+
}, b = (e) => {
|
67
|
+
if (typeof e == "number")
|
68
|
+
a.multiple ? u("update:modelValue", q(a.modelValue, 1, e)) : u("update:modelValue", null);
|
69
|
+
else {
|
70
|
+
const n = h.value.get(t.value);
|
71
|
+
b(n);
|
72
|
+
}
|
73
|
+
}, M = (e) => {
|
74
|
+
u("focus", e), f.value = !0, document.addEventListener("click", _), document.addEventListener("focusin", V), c.value instanceof HTMLInputElement && c.value.select();
|
75
|
+
}, O = (e) => {
|
76
|
+
u("click", e), !(a.disabled || a.readonly) && c.value instanceof HTMLElement && c.value.focus();
|
77
|
+
}, _ = (e) => {
|
78
|
+
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
79
|
+
u("inactive"), document.removeEventListener("click", _), f.value = !1, a.multiple && L(500).then(() => {
|
80
|
+
t.value = "";
|
81
|
+
});
|
82
|
+
return;
|
83
|
+
}
|
84
|
+
}, V = (e) => {
|
85
|
+
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
86
|
+
u("inactive"), document.removeEventListener("focusin", V), f.value = !1, a.multiple && L(500).then(() => {
|
87
|
+
t.value = "";
|
88
|
+
});
|
89
|
+
return;
|
90
|
+
}
|
91
|
+
}, T = {
|
92
|
+
onBlur: (e) => u("blur", e),
|
93
|
+
onChange: (e) => u("change", e),
|
94
|
+
onKeydown: (e) => {
|
95
|
+
e.key === "Enter" && a.divider === "Enter" && e.preventDefault(), u("keydown", e);
|
96
|
+
},
|
97
|
+
onInput: (e) => u("input", e)
|
98
|
+
};
|
99
|
+
return (e, n) => (p(), m("span", {
|
100
|
+
class: g({
|
101
|
+
"bb-base-tag": !0,
|
102
|
+
"bb-base-tag--active": f.value,
|
103
|
+
"bb-base-tag--disabled": e.disabled,
|
104
|
+
"bb-base-tag--errors": e.hasErrors,
|
105
|
+
"bb-base-tag--readonly": e.readonly
|
106
|
+
}),
|
107
|
+
onClick: O,
|
108
|
+
ref_key: "outerContainer",
|
109
|
+
ref: i
|
110
|
+
}, [
|
111
|
+
v(e.$slots, "prepend-outer"),
|
112
|
+
k("span", {
|
113
|
+
class: "bb-base-tag__inner-container",
|
114
|
+
ref_key: "innerContainer",
|
115
|
+
ref: $
|
116
|
+
}, [
|
117
|
+
v(e.$slots, "prepend"),
|
118
|
+
k("span", j, [
|
119
|
+
e.comma ? (p(!0), m(E, { key: 0 }, C(o.value, (r, d) => (p(), m("span", {
|
120
|
+
class: g({
|
121
|
+
"bb-base-tag__selected": !0,
|
122
|
+
"bb-base-tag__selected--comma": !0,
|
123
|
+
"bb-base-tag__selected--focused": d === l.value
|
124
|
+
}),
|
125
|
+
key: r
|
126
|
+
}, B(r) + B(d < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), m(E, { key: 1 }, C(o.value, (r, d) => (p(), S(U, {
|
127
|
+
class: g({
|
128
|
+
"bb-base-tag__selected": !0,
|
129
|
+
"bb-base-tag__selected--chip": !0,
|
130
|
+
"bb-base-tag__selected--focused": d === l.value
|
131
|
+
}),
|
132
|
+
clearable: !0,
|
133
|
+
key: r,
|
134
|
+
text: r,
|
135
|
+
"onClick:clear": (Q) => b(d)
|
136
|
+
}, null, 8, ["class", "text", "onClick:clear"]))), 128)),
|
137
|
+
z(k("input", H({
|
138
|
+
autocomplete: e.autocomplete,
|
139
|
+
autofocus: e.autofocus,
|
140
|
+
class: "bb-base-tag__text-input",
|
141
|
+
disabled: e.disabled,
|
142
|
+
id: e.id,
|
143
|
+
placeholder: D.value,
|
144
|
+
readonly: e.readonly,
|
145
|
+
type: "text",
|
146
|
+
onKeyup: A,
|
147
|
+
onFocus: M
|
148
|
+
}, T, {
|
149
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
|
150
|
+
ref_key: "input",
|
151
|
+
ref: c
|
152
|
+
}), null, 16, G), [
|
153
|
+
[J, t.value]
|
154
|
+
])
|
155
|
+
]),
|
156
|
+
v(e.$slots, "append")
|
157
|
+
], 512),
|
158
|
+
v(e.$slots, "append-outer")
|
159
|
+
], 2));
|
160
|
+
}
|
161
|
+
});
|
2
162
|
export {
|
3
|
-
|
163
|
+
te as default
|
4
164
|
};
|
5
165
|
//# sourceMappingURL=index241.js.map
|
package/dist/index241.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index241.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
1
|
+
{"version":3,"file":"index241.js","sources":["../src/components/BaseTag/BaseTag.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createBlock as _createBlock, vModelDynamic as _vModelDynamic, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-tag__input-container\" }\nconst _hoisted_2 = [\"autocomplete\", \"autofocus\", \"disabled\", \"id\", \"placeholder\", \"readonly\"]\n\nimport { clamp } from \"@/utilities/functions/clamp\";\nimport { computed, ref } from \"vue\";\nimport { drop } from \"@/utilities/functions/drop\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport { isNotNil } from \"@/utilities/functions/isNotNil\";\nimport BbChip from \"../BbChip/BbChip.vue\";\nimport type { CommonProps, GenericModelValue } from \"@/types/CommonProps\";\nimport { wait } from \"@/utilities/functions/wait\";\n\nexport type BaseTagProps = Pick<\n CommonProps,\n | \"autocomplete\"\n | \"autofocus\"\n | \"disabled\"\n | \"hasErrors\"\n | \"id\"\n | \"multiple\"\n | \"name\"\n | \"placeholder\"\n | \"readonly\"\n> &\n Required<GenericModelValue> & {\n /**\n * Sets the display model for selected values to a list\n * of comma separated string. In this mode the user\n * cannot deselect an option by pressing the close button.\n */\n comma?: boolean;\n /**\n * The divider key used to separate values from one another. By default it is \"Enter\"\n */\n divider?: KeyboardEvent[\"key\"];\n };\n\nexport type BaseTagEvents = {\n (e: \"blur\", event: FocusEvent): void;\n (e: \"change\", event: Event): void;\n (e: \"click\", event: MouseEvent): void;\n (e: \"duplicate\", string: string): void;\n (e: \"focus\", event: FocusEvent): void;\n (e: \"inactive\"): void;\n (e: \"input\", event: Event): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n (e: \"keyup\", event: KeyboardEvent): void;\n (e: \"update:modelValue\", value: any): void;\n};\n\nexport type BaseTagSlots = {\n \"prepend-outer\"?: (props: {}) => any;\n prepend?: (props: {}) => any;\n append?: (props: {}) => any;\n \"append-outer\"?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTag',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n multiple: { type: Boolean, default: true },\n name: {},\n placeholder: {},\n readonly: {},\n modelValue: {},\n comma: { type: Boolean },\n divider: { default: \"Enter\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"duplicate\", \"focus\", \"inactive\", \"input\", \"keydown\", \"keyup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n throw new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>(\"\");\nconst computedPlaceholder = computed(() => {\n return props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n [].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n let map: { [key: string]: number } = {};\n modelValueNormalized.value.forEach((value: any, index: number) => {\n map[JSON.stringify(value)] = index;\n });\n return {\n get: (value: any) => map[JSON.stringify(value)],\n };\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 phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n emit(\"keyup\", event);\n if (props.readonly || props.disabled) {\n event.preventDefault();\n return;\n }\n if (event.key === props.divider) {\n if (query.value[query.value.length - 1] === event.key) {\n query.value = query.value.slice(0, query.value.length - 1);\n }\n if (!query.value) return;\n focusedIndex.value = null;\n const currentIndex = modelValueIndexed.value.get(query.value);\n if (isNil(currentIndex)) selectValue(query.value);\n else emit(\"duplicate\", query.value);\n query.value = \"\";\n } else if (event.key === \"ArrowLeft\") {\n if (focusedIndex.value === null)\n focusedIndex.value = modelValueNormalized.value.length - 1;\n else if (focusedIndex.value === 0) focusedIndex.value = null;\n else focusedIndex.value--;\n } else if (event.key === \"ArrowRight\") {\n if (focusedIndex.value === null) focusedIndex.value = 1;\n else if (focusedIndex.value === modelValueNormalized.value.length - 1)\n focusedIndex.value = null;\n else focusedIndex.value++;\n } else if (event.key === \"Backspace\") {\n if (query.value) return;\n if (isNotNil(focusedIndex.value)) {\n removeValue(focusedIndex.value);\n focusedIndex.value = clamp(\n focusedIndex.value,\n 0,\n modelValueNormalized.value.length - 2\n );\n if (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n } else focusedIndex.value = modelValueNormalized.value.length - 1;\n } else if (event.key === \"Tab\" || event.key === \"Escape\") {\n focusedIndex.value = null;\n }\n};\n\nconst selectValue = (text: string) => {\n if (props.multiple) emit(\"update:modelValue\", props.modelValue.concat(text));\n else emit(\"update:modelValue\", text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n if (typeof indexOrString === \"number\") {\n if (props.multiple)\n emit(\"update:modelValue\", drop(props.modelValue, 1, indexOrString));\n else emit(\"update:modelValue\", null);\n } else {\n const currentIndex = modelValueIndexed.value.get(query.value);\n removeValue(currentIndex);\n }\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n active.value = true;\n document.addEventListener(\"click\", onClickOutside);\n document.addEventListener(\"focusin\", onFocusOutside);\n if (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n emit(\"click\", event);\n if (props.disabled || props.readonly) return;\n if (input.value instanceof HTMLElement) {\n input.value.focus();\n }\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n if (event.target instanceof Node) {\n if (outerContainer.value) {\n if (!outerContainer.value.contains(event.target)) {\n emit(\"inactive\");\n document.removeEventListener(\"click\", onClickOutside);\n active.value = false;\n if (props.multiple)\n wait(500).then(() => {\n query.value = \"\";\n });\n return;\n }\n }\n }\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n if (event.target instanceof Node) {\n if (outerContainer.value) {\n if (!outerContainer.value.contains(event.target)) {\n emit(\"inactive\");\n document.removeEventListener(\"focusin\", onFocusOutside);\n active.value = false;\n if (props.multiple)\n wait(500).then(() => {\n query.value = \"\";\n });\n return;\n }\n }\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === \"Enter\" && props.divider === \"Enter\") {\n event.preventDefault();\n }\n emit(\"keydown\", event);\n },\n onInput: (event: Event) => emit(\"input\", event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass({\n 'bb-base-tag': true,\n 'bb-base-tag--active': active.value,\n 'bb-base-tag--disabled': _ctx.disabled,\n 'bb-base-tag--errors': _ctx.hasErrors,\n 'bb-base-tag--readonly': _ctx.readonly,\n }),\n onClick: onOuterContainerClick,\n ref_key: \"outerContainer\",\n ref: outerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", {\n class: \"bb-base-tag__inner-container\",\n ref_key: \"innerContainer\",\n ref: innerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.comma)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass({\n 'bb-base-tag__selected': true,\n 'bb-base-tag__selected--comma': true,\n 'bb-base-tag__selected--focused': index === focusedIndex.value,\n }),\n key: option\n }, _toDisplayString(option) + _toDisplayString(index < modelValueNormalized.value.length - 1 ? \",\" : \"\"), 3))\n }), 128))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createBlock(BbChip, {\n class: _normalizeClass({\n 'bb-base-tag__selected': true,\n 'bb-base-tag__selected--chip': true,\n 'bb-base-tag__selected--focused': index === focusedIndex.value,\n }),\n clearable: true,\n key: option,\n text: option,\n \"onClick:clear\": ($event: any) => (removeValue(index))\n }, null, 8, [\"class\", \"text\", \"onClick:clear\"]))\n }), 128)),\n _withDirectives(_createElementVNode(\"input\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-tag__text-input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n placeholder: computedPlaceholder.value,\n readonly: _ctx.readonly,\n type: 'text',\n onKeyup: onInputKeyup,\n onFocus: onInputFocus\n }, eventListeners, {\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((query).value = $event)),\n ref_key: \"input\",\n ref: input\n }), null, 16, _hoisted_2), [\n [_vModelDynamic, query.value]\n ])\n ]),\n _renderSlot(_ctx.$slots, \"append\")\n ], 512),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_Fragment","_renderList","option","_toDisplayString","_createBlock","BbChip","$event","_withDirectives","_mergeProps","_vModelDynamic"],"mappings":";;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,kCACtBC,IAAa,CAAC,gBAAgB,aAAa,YAAY,MAAM,eAAe,UAAU,GAyDhEC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,UAAU,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IACzC,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,SAAS,EAAE,SAAS,QAAQ;AAAA,EAC9B;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,aAAa,SAAS,YAAY,SAAS,WAAW,SAAS,mBAAmB;AAAA,EACrH,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,UAAMC,IAAQF,GAERG,IAAOF;AAIb,QAAIC,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC7C,YAAA,IAAI,MAAM,2DAA2D;AAGvE,UAAAE,IAAiBC,EAAwB,IAAI,GAC7CC,IAAiBD,EAAwB,IAAI,GAC7CE,IAAQF,EAAwB,IAAI,GACpCG,IAAQH,EAAY,EAAE,GACtBI,IAAsBC,EAAS,MAC5BR,EAAM,WACd,GAEKS,IAAuBD;AAAA,MAAS,MACpC,CAAA,EAAG,OAAOR,EAAM,UAAU,EAAE,OAAOU,CAAQ;AAAA,IAAA,GAMvCC,IAAoBH,EAAS,MAAM;AACvC,UAAII,IAAiC,CAAA;AACrC,aAAAH,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