@espri/vue-components 2.0.2 → 2.0.4
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/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/input-number.css +1 -0
- package/dist/input-number.es.js +24 -26
- package/dist/input-text.css +1 -0
- package/dist/input-text.es.js +17 -19
- package/dist/select.css +1 -0
- package/dist/select.es.js +21 -23
- package/dist/types/input-number/interfaces/input-number-props.interface.d.ts +1 -1
- package/dist/virtual-keyboard.css +1 -1
- package/dist/virtual-keyboard.es.js +61 -65
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.error[data-v-8eb7b6a7]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
|
package/dist/input-number.es.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as k, FloatLabel as B, InputNumber as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class: "text-danger"
|
|
6
|
-
}, F = { class: "text-danger" }, C = /* @__PURE__ */ b({
|
|
1
|
+
import { defineComponent as _, computed as m, openBlock as a, createElementBlock as d, normalizeClass as u, createBlock as c, unref as o, withCtx as g, createVNode as V, createElementVNode as p, createTextVNode as v, toDisplayString as f, createCommentVNode as h } from "vue";
|
|
2
|
+
import { Skeleton as k, FloatLabel as B, InputNumber as C } from "primevue";
|
|
3
|
+
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
import './input-number.css';const E = ["for"], D = { key: 0 }, F = { class: "error" }, $ = /* @__PURE__ */ _({
|
|
7
5
|
__name: "input-number",
|
|
8
6
|
props: {
|
|
9
7
|
label: {},
|
|
10
8
|
modelValue: {},
|
|
11
9
|
class: {},
|
|
12
|
-
|
|
10
|
+
inputClass: {},
|
|
13
11
|
disabled: { type: Boolean },
|
|
14
12
|
required: { type: Boolean },
|
|
15
13
|
step: {},
|
|
@@ -26,29 +24,29 @@ const D = ["for"], E = {
|
|
|
26
24
|
placeholder: {}
|
|
27
25
|
},
|
|
28
26
|
emits: ["update:modelValue"],
|
|
29
|
-
setup(x, { emit:
|
|
30
|
-
const e = x,
|
|
27
|
+
setup(x, { emit: b }) {
|
|
28
|
+
const e = x, i = b, s = Math.random().toString(16).slice(2), n = m({
|
|
31
29
|
get() {
|
|
32
|
-
return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (
|
|
30
|
+
return (e.modelValue || e.modelValue === 0) && (typeof e.min == "number" && e.modelValue < e.min || typeof e.max == "number" && e.modelValue > e.max) ? (i("update:modelValue", null), null) : e.modelValue;
|
|
33
31
|
},
|
|
34
32
|
set(t) {
|
|
35
|
-
(t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null),
|
|
33
|
+
(t || t === 0) && (typeof e.min == "number" && t < e.min || typeof e.max == "number" && t > e.max) && (t = null), i("update:modelValue", t);
|
|
36
34
|
}
|
|
37
35
|
}), r = m(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
38
|
-
return (t, l) => (
|
|
36
|
+
return (t, l) => (a(), d("div", {
|
|
39
37
|
class: u(`field ${e.class || ""}`)
|
|
40
38
|
}, [
|
|
41
|
-
e.loading ? (
|
|
39
|
+
e.loading ? (a(), c(o(k), {
|
|
42
40
|
key: 0,
|
|
43
41
|
class: "skeleton-input mt-3"
|
|
44
|
-
})) : (
|
|
42
|
+
})) : (a(), c(o(B), {
|
|
45
43
|
key: 1,
|
|
46
44
|
class: "mt-3"
|
|
47
45
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
50
|
-
modelValue:
|
|
51
|
-
"onUpdate:modelValue": l[0] || (l[0] = (y) =>
|
|
46
|
+
default: g(() => [
|
|
47
|
+
V(o(C), {
|
|
48
|
+
modelValue: n.value,
|
|
49
|
+
"onUpdate:modelValue": l[0] || (l[0] = (y) => n.value = y),
|
|
52
50
|
class: u(["w-full", e.class]),
|
|
53
51
|
min: e.min,
|
|
54
52
|
max: e.max,
|
|
@@ -59,22 +57,22 @@ const D = ["for"], E = {
|
|
|
59
57
|
currency: e.currency,
|
|
60
58
|
suffix: e.suffix,
|
|
61
59
|
invalid: !!r.value,
|
|
62
|
-
"input-class": e.
|
|
60
|
+
"input-class": e.inputClass,
|
|
63
61
|
disabled: e.disabled,
|
|
64
62
|
placeholder: e.placeholder,
|
|
65
|
-
"input-id":
|
|
63
|
+
"input-id": o(s)
|
|
66
64
|
}, null, 8, ["modelValue", "min", "max", "mode", "step", "min-fraction-digits", "max-fraction-digits", "currency", "suffix", "invalid", "class", "input-class", "disabled", "placeholder", "input-id"]),
|
|
67
|
-
p("label", { for:
|
|
68
|
-
|
|
69
|
-
e.required ? (
|
|
70
|
-
], 8,
|
|
65
|
+
p("label", { for: o(s) }, [
|
|
66
|
+
v(f(e.label), 1),
|
|
67
|
+
e.required ? (a(), d("span", D, " *")) : h("", !0)
|
|
68
|
+
], 8, E)
|
|
71
69
|
]),
|
|
72
70
|
_: 1
|
|
73
71
|
})),
|
|
74
72
|
p("small", F, f(r.value), 1)
|
|
75
73
|
], 2));
|
|
76
74
|
}
|
|
77
|
-
}), S =
|
|
75
|
+
}), S = /* @__PURE__ */ N($, [["__scopeId", "data-v-8eb7b6a7"]]), R = S;
|
|
78
76
|
export {
|
|
79
|
-
|
|
77
|
+
R as default
|
|
80
78
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.error[data-v-2a41cea7]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
|
package/dist/input-text.es.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { defineComponent as V, computed as
|
|
1
|
+
import { defineComponent as V, computed as d, openBlock as o, createElementBlock as i, normalizeClass as u, createBlock as c, unref as t, withCtx as g, createVNode as v, createElementVNode as m, createTextVNode as b, toDisplayString as p, createCommentVNode as k } from "vue";
|
|
2
2
|
import { Skeleton as y, FloatLabel as B, InputText as E } from "primevue";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class: "text-danger"
|
|
6
|
-
}, N = { class: "text-danger" }, $ = /* @__PURE__ */ V({
|
|
3
|
+
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
import './input-text.css';const w = ["for"], I = { key: 0 }, N = { class: "error" }, T = /* @__PURE__ */ V({
|
|
7
5
|
__name: "input-text",
|
|
8
6
|
props: {
|
|
9
7
|
label: {},
|
|
@@ -18,31 +16,31 @@ const w = ["for"], C = {
|
|
|
18
16
|
placeholder: {}
|
|
19
17
|
},
|
|
20
18
|
emits: ["update:modelValue"],
|
|
21
|
-
setup(
|
|
22
|
-
const e =
|
|
19
|
+
setup(_, { emit: f }) {
|
|
20
|
+
const e = _, h = f, s = Math.random().toString(16).slice(2), n = d({
|
|
23
21
|
get() {
|
|
24
22
|
return e.modelValue;
|
|
25
23
|
},
|
|
26
|
-
set(
|
|
27
|
-
|
|
24
|
+
set(a) {
|
|
25
|
+
h("update:modelValue", a);
|
|
28
26
|
}
|
|
29
|
-
}),
|
|
30
|
-
return (
|
|
27
|
+
}), r = d(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
28
|
+
return (a, l) => (o(), i("div", {
|
|
31
29
|
class: u(`field ${e.class || ""}`)
|
|
32
30
|
}, [
|
|
33
|
-
e.loading ? (
|
|
31
|
+
e.loading ? (o(), c(t(y), {
|
|
34
32
|
key: 0,
|
|
35
33
|
class: "skeleton-input mt-3"
|
|
36
|
-
})) : (
|
|
34
|
+
})) : (o(), c(t(B), {
|
|
37
35
|
key: 1,
|
|
38
36
|
class: "mt-3"
|
|
39
37
|
}, {
|
|
40
|
-
default:
|
|
38
|
+
default: g(() => [
|
|
41
39
|
v(t(E), {
|
|
42
40
|
modelValue: n.value,
|
|
43
41
|
"onUpdate:modelValue": l[0] || (l[0] = (x) => n.value = x),
|
|
44
42
|
class: u(["w-full", e.class]),
|
|
45
|
-
invalid: !!
|
|
43
|
+
invalid: !!r.value,
|
|
46
44
|
maxlength: e.maxlength,
|
|
47
45
|
disabled: e.disabled,
|
|
48
46
|
placeholder: e.placeholder,
|
|
@@ -50,15 +48,15 @@ const w = ["for"], C = {
|
|
|
50
48
|
}, null, 8, ["modelValue", "class", "invalid", "maxlength", "disabled", "placeholder", "input-id"]),
|
|
51
49
|
m("label", { for: t(s) }, [
|
|
52
50
|
b(p(e.label), 1),
|
|
53
|
-
e.required ? (
|
|
51
|
+
e.required ? (o(), i("span", I, " *")) : k("", !0)
|
|
54
52
|
], 8, w)
|
|
55
53
|
]),
|
|
56
54
|
_: 1
|
|
57
55
|
})),
|
|
58
|
-
m("small", N, p(
|
|
56
|
+
m("small", N, p(r.value), 1)
|
|
59
57
|
], 2));
|
|
60
58
|
}
|
|
61
|
-
}),
|
|
59
|
+
}), $ = /* @__PURE__ */ C(T, [["__scopeId", "data-v-2a41cea7"]]), z = $;
|
|
62
60
|
export {
|
|
63
|
-
|
|
61
|
+
z as default
|
|
64
62
|
};
|
package/dist/select.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.error[data-v-5a8f854e]{color:var(--p-floatlabel-invalid-color, var(--p-red-600))}
|
package/dist/select.es.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class: "text-danger"
|
|
6
|
-
}, C = { class: "text-danger" }, N = /* @__PURE__ */ _({
|
|
1
|
+
import { defineComponent as h, computed as i, openBlock as t, createElementBlock as d, normalizeClass as c, createBlock as p, unref as o, withCtx as b, createVNode as y, createElementVNode as u, createTextVNode as g, toDisplayString as m, createCommentVNode as k } from "vue";
|
|
2
|
+
import { Skeleton as B, FloatLabel as x, Select as E } from "primevue";
|
|
3
|
+
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
import './select.css';const C = ["for"], w = { key: 0 }, N = { class: "error" }, $ = /* @__PURE__ */ h({
|
|
7
5
|
__name: "select",
|
|
8
6
|
props: {
|
|
9
7
|
label: {},
|
|
@@ -20,49 +18,49 @@ const S = ["for"], w = {
|
|
|
20
18
|
modelValue: {}
|
|
21
19
|
},
|
|
22
20
|
emits: ["update:modelValue"],
|
|
23
|
-
setup(f, { emit:
|
|
24
|
-
const e = f,
|
|
21
|
+
setup(f, { emit: _ }) {
|
|
22
|
+
const e = f, v = _, s = Math.random().toString(16).slice(2), n = i({
|
|
25
23
|
get() {
|
|
26
24
|
return e.modelValue;
|
|
27
25
|
},
|
|
28
26
|
set(a) {
|
|
29
|
-
|
|
27
|
+
v("update:modelValue", a);
|
|
30
28
|
}
|
|
31
|
-
}),
|
|
32
|
-
return (a, l) => (t(),
|
|
29
|
+
}), r = i(() => e.showError && e.rules?.find((l) => l?.$invalid && l?.$message)?.$message || "");
|
|
30
|
+
return (a, l) => (t(), d("div", {
|
|
33
31
|
class: c(`field ${e.class || ""}`)
|
|
34
32
|
}, [
|
|
35
|
-
e.loading ? (t(),
|
|
33
|
+
e.loading ? (t(), p(o(B), {
|
|
36
34
|
key: 0,
|
|
37
35
|
class: "skeleton-input mt-3"
|
|
38
|
-
})) : (t(),
|
|
36
|
+
})) : (t(), p(o(x), {
|
|
39
37
|
key: 1,
|
|
40
38
|
class: "mt-3"
|
|
41
39
|
}, {
|
|
42
40
|
default: b(() => [
|
|
43
|
-
|
|
41
|
+
y(o(E), {
|
|
44
42
|
modelValue: n.value,
|
|
45
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
43
|
+
"onUpdate:modelValue": l[0] || (l[0] = (V) => n.value = V),
|
|
46
44
|
options: e.options,
|
|
47
45
|
"option-label": "label",
|
|
48
46
|
"option-value": "value",
|
|
49
47
|
class: c(["w-full", e.class]),
|
|
50
|
-
invalid: !!
|
|
48
|
+
invalid: !!r.value,
|
|
51
49
|
disabled: e.disabled,
|
|
52
50
|
placeholder: e.placeholder,
|
|
53
51
|
"input-id": o(s)
|
|
54
52
|
}, null, 8, ["modelValue", "options", "class", "invalid", "disabled", "placeholder", "input-id"]),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
e.required ? (t(),
|
|
58
|
-
], 8,
|
|
53
|
+
u("label", { for: o(s) }, [
|
|
54
|
+
g(m(e.label), 1),
|
|
55
|
+
e.required ? (t(), d("span", w, " *")) : k("", !0)
|
|
56
|
+
], 8, C)
|
|
59
57
|
]),
|
|
60
58
|
_: 1
|
|
61
59
|
})),
|
|
62
|
-
|
|
60
|
+
u("small", N, m(r.value), 1)
|
|
63
61
|
], 2));
|
|
64
62
|
}
|
|
65
|
-
}),
|
|
63
|
+
}), q = /* @__PURE__ */ S($, [["__scopeId", "data-v-5a8f854e"]]), F = q;
|
|
66
64
|
export {
|
|
67
|
-
|
|
65
|
+
F as default
|
|
68
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span,.hg-theme-default .hg-button span svg{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px #0000004d;box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:#05194687;color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:#00000008;cursor:pointer}li.hg-candidate-box-list-item:active{background:#0000001a}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}#keyboard[data-v-
|
|
1
|
+
.hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span,.hg-theme-default .hg-button span svg{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px #0000004d;box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:#05194687;color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:#00000008;cursor:pointer}li.hg-candidate-box-list-item:active{background:#0000001a}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}#keyboard[data-v-d0bbce72]{position:fixed;bottom:0;left:0;width:100%;z-index:10}.hide-keyboard[data-v-d0bbce72]{display:none}.hg-button[data-skbtn="{shift}"],.hg-button[data-skbtn="{enter}"]{flex-grow:1;font-size:1.5em;width:20px}.hg-button[data-skbtn="{bksp}"]{width:20px}.hg-button[data-skbtn="{space}"]{flex-grow:8}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as O, ref as a, onMounted as A, onBeforeUnmount as M, watch as R, openBlock as q, createElementBlock as P, normalizeClass as w, createElementVNode as V } from "vue";
|
|
2
2
|
import Y from "simple-keyboard";
|
|
3
|
-
import
|
|
3
|
+
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
import './virtual-keyboard.css';const L = "input:not(.not-open-keyboard), textarea:not(.not-open-keyboard)", T = "default-class", i = 230, z = /* @__PURE__ */ O({
|
|
4
5
|
__name: "virtual-keyboard",
|
|
5
6
|
props: {
|
|
6
7
|
refreshInputsTimestamp: {}
|
|
7
8
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
function
|
|
9
|
+
setup(x) {
|
|
10
|
+
const C = x, t = a(null), s = a(0), u = a(!0);
|
|
11
|
+
let c = 0;
|
|
12
|
+
const n = a(null), d = a();
|
|
13
|
+
let r = 0;
|
|
14
|
+
function _() {
|
|
14
15
|
return !!t.value?.className.includes("keyboard-force-dispatch-event");
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function v() {
|
|
17
18
|
return t.value?.className.includes("keyboard-number") ? "numeric" : "text";
|
|
18
19
|
}
|
|
19
20
|
function I(e = !1) {
|
|
20
|
-
|
|
21
|
+
n.value && n.value.setOptions({
|
|
21
22
|
layout: {
|
|
22
23
|
default: [
|
|
23
24
|
`& é " ' ( § è ! ç à ) - {bksp}`,
|
|
@@ -35,15 +36,15 @@ import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textar
|
|
|
35
36
|
]
|
|
36
37
|
},
|
|
37
38
|
newLineOnEnter: e
|
|
38
|
-
}),
|
|
39
|
+
}), l();
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
document.querySelectorAll("#keyboard .hg-rows, #keyboard .hg-row, #keyboard .hg-button").forEach((
|
|
42
|
-
|
|
41
|
+
function l() {
|
|
42
|
+
document.querySelectorAll("#keyboard .hg-rows, #keyboard .hg-row, #keyboard .hg-button").forEach((o) => {
|
|
43
|
+
o.removeEventListener("mousedown", y), o.addEventListener("mousedown", y), o.removeEventListener("touchstart", b), o.addEventListener("touchstart", b);
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
function B() {
|
|
46
|
-
|
|
47
|
+
n.value && n.value.setOptions({
|
|
47
48
|
layout: {
|
|
48
49
|
default: [
|
|
49
50
|
"1 2 3 {bksp}",
|
|
@@ -53,76 +54,76 @@ import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textar
|
|
|
53
54
|
]
|
|
54
55
|
},
|
|
55
56
|
newLineOnEnter: !1
|
|
56
|
-
}),
|
|
57
|
+
}), l();
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
document.querySelectorAll(
|
|
60
|
-
e.addEventListener("focus",
|
|
59
|
+
function f() {
|
|
60
|
+
document.querySelectorAll(L).forEach((e) => {
|
|
61
|
+
e.addEventListener("focus", p), e.addEventListener("input", h);
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
-
if (Date.now() -
|
|
64
|
+
function m(e) {
|
|
65
|
+
if (Date.now() - c < 100)
|
|
65
66
|
return;
|
|
66
|
-
const
|
|
67
|
-
t.value && !t.value.contains(
|
|
67
|
+
const o = e.target;
|
|
68
|
+
t.value && !t.value.contains(o) && !d.value?.contains(o) && g();
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
70
|
+
function p(e) {
|
|
71
|
+
c = Date.now(), t.value = e.target, n.value && (n.value.setInput(t.value.value), D());
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
73
|
+
function h(e) {
|
|
74
|
+
n.value?.setInput(e.target.value);
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
+
function y(e) {
|
|
76
77
|
e.preventDefault();
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
+
function b(e) {
|
|
79
80
|
e.preventDefault();
|
|
80
81
|
}
|
|
81
82
|
function S() {
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
layoutName:
|
|
86
|
-
}),
|
|
83
|
+
if (n.value) {
|
|
84
|
+
const o = n.value.options.layoutName === "default" ? "shift" : "default";
|
|
85
|
+
n.value.setOptions({
|
|
86
|
+
layoutName: o
|
|
87
|
+
}), l();
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
90
|
+
function g() {
|
|
91
|
+
u.value = !0, t.value = null, s.value = 0, document.body.style.marginBottom = `${r + s.value}px`;
|
|
91
92
|
}
|
|
92
93
|
function D() {
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
const e = t.value.getBoundingClientRect(),
|
|
96
|
-
|
|
94
|
+
if (u.value = !1, t.value) {
|
|
95
|
+
v() === "numeric" ? B() : I(t.value.tagName.toLowerCase() === "textarea");
|
|
96
|
+
const e = t.value.getBoundingClientRect(), o = document.documentElement.scrollHeight;
|
|
97
|
+
o - e.bottom < i && (s.value = i - (o - e.bottom) + 30, r = +document.body.style.marginBottom.split("px")[0], document.body.style.marginBottom = `${r + s.value}px`);
|
|
97
98
|
}
|
|
98
99
|
setTimeout(() => {
|
|
99
100
|
if (t.value) {
|
|
100
|
-
const e = t.value.getBoundingClientRect(),
|
|
101
|
-
window.scrollTo({ top: Math.min(H,
|
|
101
|
+
const e = t.value.getBoundingClientRect(), o = document.documentElement.scrollHeight, E = window.innerHeight, N = window.scrollY + E - e.bottom, H = window.scrollY + (window.scrollY + (i - N)) + 30, F = o - E;
|
|
102
|
+
window.scrollTo({ top: Math.min(H, F), behavior: "smooth" });
|
|
102
103
|
}
|
|
103
104
|
}, 100);
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
-
document.querySelectorAll(
|
|
107
|
-
e.removeEventListener("focus",
|
|
106
|
+
function k() {
|
|
107
|
+
document.querySelectorAll(L).forEach((e) => {
|
|
108
|
+
e.removeEventListener("focus", p), e.removeEventListener("input", h);
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
111
|
function K() {
|
|
111
|
-
|
|
112
|
+
k(), f();
|
|
112
113
|
}
|
|
113
114
|
return A(async () => {
|
|
114
|
-
|
|
115
|
+
n.value = new Y(T, {
|
|
115
116
|
onChange: (e) => {
|
|
116
|
-
t.value && (t.value.value = e, (
|
|
117
|
+
t.value && (t.value.value = e, (_() || v() === "text") && t.value.dispatchEvent(new Event("input")));
|
|
117
118
|
},
|
|
118
119
|
onKeyPress: (e) => {
|
|
119
120
|
if (t.value) {
|
|
120
|
-
const
|
|
121
|
+
const o = (t.value.selectionStart || 0) + (e === "{bksp}" ? -1 : 1);
|
|
121
122
|
setTimeout(() => {
|
|
122
|
-
t.value && t.value.setSelectionRange(
|
|
123
|
+
t.value && t.value.setSelectionRange(o, o);
|
|
123
124
|
}, 0);
|
|
124
125
|
}
|
|
125
|
-
e === "{shift}" || e === "{lock}" ? S() : e === "{enter}" && t.value && t.value.tagName.toLowerCase() !== "textarea" && (t.value.blur(),
|
|
126
|
+
e === "{shift}" || e === "{lock}" ? S() : e === "{enter}" && t.value && t.value.tagName.toLowerCase() !== "textarea" && (t.value.blur(), g());
|
|
126
127
|
},
|
|
127
128
|
display: {
|
|
128
129
|
"{bksp}": "⌫",
|
|
@@ -132,28 +133,23 @@ import './virtual-keyboard.css';const _ = "input:not(.not-open-keyboard), textar
|
|
|
132
133
|
"{space}": " ",
|
|
133
134
|
"{tab}": "⇆"
|
|
134
135
|
}
|
|
135
|
-
}),
|
|
136
|
+
}), f(), document.addEventListener("click", m);
|
|
136
137
|
}), M(() => {
|
|
137
|
-
|
|
138
|
-
}), R(() =>
|
|
138
|
+
k(), document.removeEventListener("click", m);
|
|
139
|
+
}), R(() => C.refreshInputsTimestamp, () => {
|
|
139
140
|
K();
|
|
140
|
-
}), (e,
|
|
141
|
+
}), (e, o) => (q(), P("div", {
|
|
141
142
|
id: "keyboard",
|
|
142
143
|
ref_key: "keyboardContainer",
|
|
143
|
-
ref:
|
|
144
|
-
class:
|
|
144
|
+
ref: d,
|
|
145
|
+
class: w({ "hide-keyboard": u.value })
|
|
145
146
|
}, [
|
|
146
147
|
V("div", {
|
|
147
|
-
class: T
|
|
148
|
+
class: w(T)
|
|
148
149
|
})
|
|
149
150
|
], 2));
|
|
150
151
|
}
|
|
151
|
-
}),
|
|
152
|
-
const t = r.__vccOpts || r;
|
|
153
|
-
for (const [a, s] of l)
|
|
154
|
-
t[a] = s;
|
|
155
|
-
return t;
|
|
156
|
-
}, $ = /* @__PURE__ */ z(U, [["__scopeId", "data-v-7fa2df55"]]), J = $;
|
|
152
|
+
}), $ = /* @__PURE__ */ U(z, [["__scopeId", "data-v-d0bbce72"]]), Q = $;
|
|
157
153
|
export {
|
|
158
|
-
|
|
154
|
+
Q as default
|
|
159
155
|
};
|