@espri/vue-components 2.0.1 → 2.0.2
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/input-number.es.js +11 -10
- package/dist/input-text.es.js +5 -6
- package/dist/select.es.js +11 -12
- package/dist/types/input-number/interfaces/input-number-props.interface.d.ts +1 -1
- package/dist/types/input-text/interfaces/input-text-props.interface.d.ts +1 -5
- package/dist/types/select/interfaces/select-props.interface.d.ts +0 -4
- package/package.json +1 -1
package/dist/input-number.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as m, openBlock as
|
|
1
|
+
import { defineComponent as b, computed as m, openBlock as i, createElementBlock as d, normalizeClass as u, createBlock as c, unref as a, withCtx as V, createVNode as _, createElementVNode as p, createTextVNode as h, toDisplayString as f, createCommentVNode as v } from "vue";
|
|
2
2
|
import { Skeleton as k, FloatLabel as B, InputNumber as N } from "primevue";
|
|
3
3
|
const D = ["for"], E = {
|
|
4
4
|
key: 0,
|
|
@@ -27,21 +27,21 @@ const D = ["for"], E = {
|
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue"],
|
|
29
29
|
setup(x, { emit: g }) {
|
|
30
|
-
const e = x,
|
|
30
|
+
const e = x, o = g, n = Math.random().toString(16).slice(2), s = m({
|
|
31
31
|
get() {
|
|
32
|
-
return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (
|
|
32
|
+
return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (o("update:modelValue", null), null) : e.modelValue;
|
|
33
33
|
},
|
|
34
34
|
set(t) {
|
|
35
|
-
(t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null),
|
|
35
|
+
(t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null), o("update:modelValue", t);
|
|
36
36
|
}
|
|
37
37
|
}), r = m(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
38
|
-
return (t, l) => (
|
|
38
|
+
return (t, l) => (i(), d("div", {
|
|
39
39
|
class: u(`field ${e.class || ""}`)
|
|
40
40
|
}, [
|
|
41
|
-
e.loading ? (
|
|
41
|
+
e.loading ? (i(), c(a(k), {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "skeleton-input mt-3"
|
|
44
|
-
})) : (
|
|
44
|
+
})) : (i(), c(a(B), {
|
|
45
45
|
key: 1,
|
|
46
46
|
class: "mt-3"
|
|
47
47
|
}, {
|
|
@@ -49,7 +49,7 @@ const D = ["for"], E = {
|
|
|
49
49
|
_(a(N), {
|
|
50
50
|
modelValue: s.value,
|
|
51
51
|
"onUpdate:modelValue": l[0] || (l[0] = (y) => s.value = y),
|
|
52
|
-
class: u(["w-full", e.
|
|
52
|
+
class: u(["w-full", e.class]),
|
|
53
53
|
min: e.min,
|
|
54
54
|
max: e.max,
|
|
55
55
|
mode: e.mode,
|
|
@@ -59,13 +59,14 @@ const D = ["for"], E = {
|
|
|
59
59
|
currency: e.currency,
|
|
60
60
|
suffix: e.suffix,
|
|
61
61
|
invalid: !!r.value,
|
|
62
|
+
"input-class": e.classInput,
|
|
62
63
|
disabled: e.disabled,
|
|
63
64
|
placeholder: e.placeholder,
|
|
64
65
|
"input-id": a(n)
|
|
65
|
-
}, null, 8, ["modelValue", "min", "max", "mode", "step", "min-fraction-digits", "max-fraction-digits", "currency", "suffix", "invalid", "class", "disabled", "placeholder", "input-id"]),
|
|
66
|
+
}, null, 8, ["modelValue", "min", "max", "mode", "step", "min-fraction-digits", "max-fraction-digits", "currency", "suffix", "invalid", "class", "input-class", "disabled", "placeholder", "input-id"]),
|
|
66
67
|
p("label", { for: a(n) }, [
|
|
67
68
|
h(f(e.label), 1),
|
|
68
|
-
e.required ? (
|
|
69
|
+
e.required ? (i(), d("span", E, " *")) : v("", !0)
|
|
69
70
|
], 8, D)
|
|
70
71
|
]),
|
|
71
72
|
_: 1
|
package/dist/input-text.es.js
CHANGED
|
@@ -3,13 +3,12 @@ import { Skeleton as y, FloatLabel as B, InputText as E } from "primevue";
|
|
|
3
3
|
const w = ["for"], C = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-danger"
|
|
6
|
-
},
|
|
6
|
+
}, N = { class: "text-danger" }, $ = /* @__PURE__ */ V({
|
|
7
7
|
__name: "input-text",
|
|
8
8
|
props: {
|
|
9
9
|
label: {},
|
|
10
10
|
modelValue: {},
|
|
11
11
|
class: {},
|
|
12
|
-
classInput: {},
|
|
13
12
|
disabled: { type: Boolean },
|
|
14
13
|
required: { type: Boolean },
|
|
15
14
|
loading: { type: Boolean },
|
|
@@ -42,7 +41,7 @@ const w = ["for"], C = {
|
|
|
42
41
|
v(t(E), {
|
|
43
42
|
modelValue: n.value,
|
|
44
43
|
"onUpdate:modelValue": l[0] || (l[0] = (x) => n.value = x),
|
|
45
|
-
class: u(["w-full", e.
|
|
44
|
+
class: u(["w-full", e.class]),
|
|
46
45
|
invalid: !!d.value,
|
|
47
46
|
maxlength: e.maxlength,
|
|
48
47
|
disabled: e.disabled,
|
|
@@ -56,10 +55,10 @@ const w = ["for"], C = {
|
|
|
56
55
|
]),
|
|
57
56
|
_: 1
|
|
58
57
|
})),
|
|
59
|
-
m("small",
|
|
58
|
+
m("small", N, p(d.value), 1)
|
|
60
59
|
], 2));
|
|
61
60
|
}
|
|
62
|
-
}),
|
|
61
|
+
}), q = $;
|
|
63
62
|
export {
|
|
64
|
-
|
|
63
|
+
q as default
|
|
65
64
|
};
|
package/dist/select.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, computed as r, openBlock as
|
|
1
|
+
import { defineComponent as _, computed as r, openBlock as t, createElementBlock as i, normalizeClass as c, createBlock as u, unref as o, withCtx as b, createVNode as g, createElementVNode as p, createTextVNode as y, toDisplayString as m, createCommentVNode as k } from "vue";
|
|
2
2
|
import { Skeleton as x, FloatLabel as B, Select as E } from "primevue";
|
|
3
3
|
const S = ["for"], w = {
|
|
4
4
|
key: 0,
|
|
@@ -8,7 +8,6 @@ const S = ["for"], w = {
|
|
|
8
8
|
props: {
|
|
9
9
|
label: {},
|
|
10
10
|
options: {},
|
|
11
|
-
classInput: {},
|
|
12
11
|
disabled: { type: Boolean },
|
|
13
12
|
required: { type: Boolean },
|
|
14
13
|
showError: { type: Boolean },
|
|
@@ -30,32 +29,32 @@ const S = ["for"], w = {
|
|
|
30
29
|
V("update:modelValue", a);
|
|
31
30
|
}
|
|
32
31
|
}), d = r(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
33
|
-
return (a, l) => (
|
|
32
|
+
return (a, l) => (t(), i("div", {
|
|
34
33
|
class: c(`field ${e.class || ""}`)
|
|
35
34
|
}, [
|
|
36
|
-
e.loading ? (
|
|
35
|
+
e.loading ? (t(), u(o(x), {
|
|
37
36
|
key: 0,
|
|
38
37
|
class: "skeleton-input mt-3"
|
|
39
|
-
})) : (
|
|
38
|
+
})) : (t(), u(o(B), {
|
|
40
39
|
key: 1,
|
|
41
40
|
class: "mt-3"
|
|
42
41
|
}, {
|
|
43
42
|
default: b(() => [
|
|
44
|
-
g(
|
|
43
|
+
g(o(E), {
|
|
45
44
|
modelValue: n.value,
|
|
46
45
|
"onUpdate:modelValue": l[0] || (l[0] = (h) => n.value = h),
|
|
47
46
|
options: e.options,
|
|
48
47
|
"option-label": "label",
|
|
49
48
|
"option-value": "value",
|
|
50
|
-
class: c(["w-full", e.
|
|
49
|
+
class: c(["w-full", e.class]),
|
|
51
50
|
invalid: !!d.value,
|
|
52
51
|
disabled: e.disabled,
|
|
53
52
|
placeholder: e.placeholder,
|
|
54
|
-
"input-id":
|
|
53
|
+
"input-id": o(s)
|
|
55
54
|
}, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "input-id"]),
|
|
56
|
-
p("label", { for:
|
|
55
|
+
p("label", { for: o(s) }, [
|
|
57
56
|
y(m(e.label), 1),
|
|
58
|
-
e.required ? (
|
|
57
|
+
e.required ? (t(), i("span", w, " *")) : k("", !0)
|
|
59
58
|
], 8, S)
|
|
60
59
|
]),
|
|
61
60
|
_: 1
|
|
@@ -63,7 +62,7 @@ const S = ["for"], w = {
|
|
|
63
62
|
p("small", C, m(d.value), 1)
|
|
64
63
|
], 2));
|
|
65
64
|
}
|
|
66
|
-
}),
|
|
65
|
+
}), R = N;
|
|
67
66
|
export {
|
|
68
|
-
|
|
67
|
+
R as default
|
|
69
68
|
};
|
|
@@ -6,15 +6,11 @@ export default interface EspriInputTextProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* Model value representing the current state of the input.
|
|
8
8
|
*/
|
|
9
|
-
modelValue: string;
|
|
9
|
+
modelValue: string | null;
|
|
10
10
|
/**
|
|
11
11
|
* Class of the component.
|
|
12
12
|
*/
|
|
13
13
|
class?: any;
|
|
14
|
-
/**
|
|
15
|
-
* Optional CSS class applied to the input element.
|
|
16
|
-
*/
|
|
17
|
-
classInput?: string;
|
|
18
14
|
/**
|
|
19
15
|
* Disables the input when true.
|
|
20
16
|
*/
|
|
@@ -17,10 +17,6 @@ export default interface EspriSelectProps {
|
|
|
17
17
|
* Array of options available for selection.
|
|
18
18
|
*/
|
|
19
19
|
options: Array<EspriSelectOption>;
|
|
20
|
-
/**
|
|
21
|
-
* Optional CSS class applied to the input element.
|
|
22
|
-
*/
|
|
23
|
-
classInput?: string;
|
|
24
20
|
/**
|
|
25
21
|
* Disables the input when true.
|
|
26
22
|
*/
|