@stonecrop/beam 0.2.33 → 0.2.35
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/beam.js +168 -163
- package/dist/beam.js.map +1 -1
- package/dist/beam.umd.cjs +1 -1
- package/dist/beam.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +5 -5
- package/src/components/ActionFooter.vue +1 -1
- package/src/components/BeamModal.vue +1 -3
- package/src/components/BeamModalOutlet.vue +4 -1
- package/src/components/ItemCheck.vue +2 -15
- package/src/components/ItemCount.vue +15 -23
- package/src/components/ListAnchor.vue +1 -6
- package/src/components/ListItem.vue +8 -8
- package/src/components/ListView.vue +1 -1
- package/src/components/Navbar.vue +1 -1
- package/src/components/ScanInput.vue +1 -4
package/dist/beam.js
CHANGED
|
@@ -1,237 +1,242 @@
|
|
|
1
|
-
import { defineComponent as d, openBlock as
|
|
2
|
-
const j = { class: "beam__actionfooter" },
|
|
1
|
+
import { defineComponent as d, openBlock as i, createElementBlock as u, createElementVNode as c, renderSlot as v, resolveComponent as k, createBlock as p, withCtx as w, withDirectives as T, vShow as I, useModel as P, vModelCheckbox as V, mergeModels as M, computed as E, normalizeClass as F, toDisplayString as h, createCommentVNode as y, ref as N, onMounted as D, onUnmounted as $, Fragment as x, renderList as A, resolveDynamicComponent as z, createVNode as O, createTextVNode as U } from "vue";
|
|
2
|
+
const j = { class: "beam__actionfooter" }, H = { class: "footer-action-wrapper" }, Q = /* @__PURE__ */ d({
|
|
3
3
|
__name: "ActionFooter",
|
|
4
4
|
emits: ["click"],
|
|
5
|
-
setup(s, { emit:
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
setup(s, { emit: o }) {
|
|
6
|
+
const r = o, e = () => {
|
|
7
|
+
r("click");
|
|
8
8
|
};
|
|
9
|
-
return (t, a) => (
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
return (t, a) => (i(), u("footer", j, [
|
|
10
|
+
c("span", H, [
|
|
11
|
+
c("button", {
|
|
12
12
|
class: "footer-action btn",
|
|
13
13
|
onClick: e
|
|
14
14
|
}, [
|
|
15
|
-
|
|
15
|
+
v(t.$slots, "default")
|
|
16
16
|
])
|
|
17
17
|
])
|
|
18
18
|
]));
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), q = { class: "beam__modal" }, R = /* @__PURE__ */ d({
|
|
21
21
|
__name: "BeamModal",
|
|
22
22
|
props: {
|
|
23
23
|
showModal: { type: Boolean }
|
|
24
24
|
},
|
|
25
25
|
setup(s) {
|
|
26
|
-
return (
|
|
27
|
-
const e =
|
|
28
|
-
return
|
|
29
|
-
default:
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
return (o, r) => {
|
|
27
|
+
const e = k("portal");
|
|
28
|
+
return i(), p(e, { to: "beam__modal_outlet" }, {
|
|
29
|
+
default: w(() => [
|
|
30
|
+
T(c("div", q, [
|
|
31
|
+
c("button", {
|
|
32
32
|
class: "btn",
|
|
33
|
-
onClick:
|
|
33
|
+
onClick: r[0] || (r[0] = (t) => o.$emit("closemodal"))
|
|
34
34
|
}, "Close Modal"),
|
|
35
|
-
|
|
36
|
-
onClosemodal:
|
|
37
|
-
onConfirmmodal:
|
|
35
|
+
v(o.$slots, "default", {
|
|
36
|
+
onClosemodal: r[1] || (r[1] = (t) => o.$emit("closemodal")),
|
|
37
|
+
onConfirmmodal: r[2] || (r[2] = (t) => o.$emit("confirmmodal"))
|
|
38
38
|
})
|
|
39
39
|
], 512), [
|
|
40
|
-
[
|
|
40
|
+
[I, o.showModal]
|
|
41
41
|
])
|
|
42
42
|
]),
|
|
43
43
|
_: 3
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), G = /* @__PURE__ */ d({
|
|
48
48
|
__name: "BeamModalOutlet",
|
|
49
|
+
emits: ["confirmmodal", "closemodal"],
|
|
49
50
|
setup(s) {
|
|
50
|
-
return (
|
|
51
|
-
const e =
|
|
52
|
-
return
|
|
51
|
+
return (o, r) => {
|
|
52
|
+
const e = k("portal-target");
|
|
53
|
+
return i(), p(e, { name: "beam__modal_outlet" });
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
|
-
}),
|
|
56
|
-
const
|
|
57
|
-
for (const [e, t] of
|
|
58
|
-
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
function J(s,
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
}), S = (s, o) => {
|
|
57
|
+
const r = s.__vccOpts || s;
|
|
58
|
+
for (const [e, t] of o)
|
|
59
|
+
r[e] = t;
|
|
60
|
+
return r;
|
|
61
|
+
}, W = {}, Y = { class: "beam__modal-confirm" };
|
|
62
|
+
function J(s, o) {
|
|
63
|
+
return i(), u("div", Y, [
|
|
64
|
+
o[2] || (o[2] = c("h2", null, "Would you like to continue?", -1)),
|
|
65
|
+
c("button", {
|
|
65
66
|
class: "btn",
|
|
66
|
-
onClick:
|
|
67
|
+
onClick: o[0] || (o[0] = (r) => s.$emit("confirmmodal"))
|
|
67
68
|
}, "Yes"),
|
|
68
|
-
|
|
69
|
+
c("button", {
|
|
69
70
|
class: "btn",
|
|
70
|
-
onClick:
|
|
71
|
+
onClick: o[1] || (o[1] = (r) => s.$emit("closemodal"))
|
|
71
72
|
}, "No")
|
|
72
73
|
]);
|
|
73
74
|
}
|
|
74
|
-
const X = /* @__PURE__ */
|
|
75
|
-
class: "checkmark",
|
|
76
|
-
tabindex: "0"
|
|
77
|
-
}, null, -1)), ae = /* @__PURE__ */ d({
|
|
75
|
+
const X = /* @__PURE__ */ S(W, [["render", J]]), Z = { class: "container" }, ee = /* @__PURE__ */ d({
|
|
78
76
|
__name: "ItemCheck",
|
|
79
77
|
props: {
|
|
80
|
-
|
|
78
|
+
modelValue: { type: Boolean, default: !1 },
|
|
79
|
+
modelModifiers: {}
|
|
81
80
|
},
|
|
82
|
-
emits: ["
|
|
83
|
-
setup(s
|
|
84
|
-
const o = s,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return (n, i) => (c(), u("label", ee, [
|
|
88
|
-
l("input", {
|
|
81
|
+
emits: ["update:modelValue"],
|
|
82
|
+
setup(s) {
|
|
83
|
+
const o = P(s, "modelValue");
|
|
84
|
+
return (r, e) => (i(), u("label", Z, [
|
|
85
|
+
T(c("input", {
|
|
89
86
|
type: "checkbox",
|
|
90
|
-
|
|
91
|
-
onInput: a,
|
|
87
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => o.value = t),
|
|
92
88
|
tabindex: "-1"
|
|
93
|
-
}, null,
|
|
94
|
-
|
|
89
|
+
}, null, 512), [
|
|
90
|
+
[V, o.value]
|
|
91
|
+
]),
|
|
92
|
+
e[1] || (e[1] = c("div", {
|
|
93
|
+
class: "checkmark",
|
|
94
|
+
tabindex: "0"
|
|
95
|
+
}, null, -1))
|
|
95
96
|
]));
|
|
96
97
|
}
|
|
97
|
-
}),
|
|
98
|
+
}), K = /* @__PURE__ */ S(ee, [["__scopeId", "data-v-f44a510e"]]), te = { class: "beam__itemcount" }, ne = ["contenteditable"], ae = { key: 0 }, L = /* @__PURE__ */ d({
|
|
98
99
|
__name: "ItemCount",
|
|
99
|
-
props: {
|
|
100
|
-
value: { default: 0 },
|
|
100
|
+
props: /* @__PURE__ */ M({
|
|
101
101
|
denominator: {},
|
|
102
102
|
uom: { default: "" },
|
|
103
103
|
editable: { type: Boolean, default: !0 }
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
104
|
+
}, {
|
|
105
|
+
modelValue: { required: !0 },
|
|
106
|
+
modelModifiers: {}
|
|
107
|
+
}),
|
|
108
|
+
emits: ["update:modelValue"],
|
|
109
|
+
setup(s) {
|
|
110
|
+
const o = P(s, "modelValue"), r = E(() => o.value === s.denominator), e = (t) => {
|
|
111
|
+
t.preventDefault(), t.stopPropagation();
|
|
112
|
+
const a = Number(t.target.innerHTML) || 0;
|
|
113
|
+
o.value = Math.min(a, s.denominator);
|
|
114
|
+
};
|
|
115
|
+
return (t, a) => (i(), u("div", te, [
|
|
116
|
+
c("span", {
|
|
117
|
+
contenteditable: t.editable,
|
|
118
|
+
class: F({ alert: !r.value }),
|
|
119
|
+
onInput: e,
|
|
120
|
+
onClick: e
|
|
121
|
+
}, h(o.value), 43, ne),
|
|
122
|
+
c("span", null, "/" + h(t.denominator), 1),
|
|
123
|
+
t.uom ? (i(), u("span", ae, " " + h(t.uom), 1)) : y("", !0)
|
|
119
124
|
]));
|
|
120
125
|
}
|
|
121
|
-
}),
|
|
126
|
+
}), oe = ["href"], se = /* @__PURE__ */ d({
|
|
122
127
|
__name: "ListAnchor",
|
|
123
128
|
props: {
|
|
124
129
|
to: { default: "" }
|
|
125
130
|
},
|
|
126
131
|
setup(s) {
|
|
127
|
-
return (
|
|
128
|
-
href:
|
|
132
|
+
return (o, r) => (i(), u("a", {
|
|
133
|
+
href: o.to,
|
|
129
134
|
class: "beam__listanchor"
|
|
130
135
|
}, [
|
|
131
|
-
|
|
132
|
-
], 8,
|
|
136
|
+
v(o.$slots, "default")
|
|
137
|
+
], 8, oe));
|
|
133
138
|
}
|
|
134
|
-
}),
|
|
139
|
+
}), re = {
|
|
135
140
|
tabindex: "0",
|
|
136
141
|
class: "beam__listitem"
|
|
137
|
-
},
|
|
142
|
+
}, ie = { class: "beam__listtext" }, C = /* @__PURE__ */ d({
|
|
138
143
|
__name: "ListItem",
|
|
139
144
|
props: {
|
|
140
145
|
item: {}
|
|
141
146
|
},
|
|
142
147
|
setup(s) {
|
|
143
|
-
const o =
|
|
144
|
-
return (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
const o = N(s.item);
|
|
149
|
+
return (r, e) => (i(), u("li", re, [
|
|
150
|
+
c("div", ie, [
|
|
151
|
+
c("label", null, h(o.value.label), 1),
|
|
152
|
+
c("p", null, h(o.value.description), 1)
|
|
148
153
|
]),
|
|
149
|
-
|
|
154
|
+
o.value.count ? (i(), p(L, {
|
|
150
155
|
key: 0,
|
|
151
156
|
modelValue: o.value.count.count,
|
|
152
|
-
"onUpdate:modelValue":
|
|
153
|
-
denominator:
|
|
154
|
-
uom:
|
|
157
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => o.value.count.count = t),
|
|
158
|
+
denominator: o.value.count.of,
|
|
159
|
+
uom: o.value.count.uom,
|
|
155
160
|
editable: !0
|
|
156
161
|
}, null, 8, ["modelValue", "denominator", "uom"])) : y("", !0),
|
|
157
|
-
|
|
162
|
+
o.value.hasOwnProperty("checked") ? (i(), p(K, {
|
|
158
163
|
key: 1,
|
|
159
164
|
modelValue: o.value.checked,
|
|
160
|
-
"onUpdate:modelValue":
|
|
165
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => o.value.checked = t)
|
|
161
166
|
}, null, 8, ["modelValue"])) : y("", !0)
|
|
162
167
|
]));
|
|
163
168
|
}
|
|
164
|
-
}),
|
|
169
|
+
}), ce = { class: "beam__listview" }, le = /* @__PURE__ */ d({
|
|
165
170
|
__name: "ListView",
|
|
166
171
|
props: {
|
|
167
172
|
items: {}
|
|
168
173
|
},
|
|
169
174
|
emits: ["scrollbottom"],
|
|
170
|
-
setup(s, { emit:
|
|
171
|
-
const
|
|
172
|
-
|
|
175
|
+
setup(s, { emit: o }) {
|
|
176
|
+
const r = o;
|
|
177
|
+
D(() => {
|
|
173
178
|
window.addEventListener("scroll", e);
|
|
174
179
|
}), $(() => {
|
|
175
180
|
window.removeEventListener("scroll", e);
|
|
176
181
|
});
|
|
177
182
|
const e = () => {
|
|
178
183
|
const t = document.documentElement.scrollHeight - window.innerHeight, a = document.documentElement.scrollTop;
|
|
179
|
-
t - a <= 2 &&
|
|
184
|
+
t - a <= 2 && r("scrollbottom");
|
|
180
185
|
};
|
|
181
|
-
return (t, a) => (
|
|
182
|
-
(
|
|
186
|
+
return (t, a) => (i(), u("ul", ce, [
|
|
187
|
+
(i(!0), u(x, null, A(t.items, (n) => (i(), u("li", {
|
|
183
188
|
key: n.label
|
|
184
189
|
}, [
|
|
185
|
-
n.linkComponent ? (
|
|
190
|
+
n.linkComponent ? (i(), p(z(n.linkComponent), {
|
|
186
191
|
key: 0,
|
|
187
192
|
to: n.route,
|
|
188
193
|
tabindex: "-1"
|
|
189
194
|
}, {
|
|
190
|
-
default:
|
|
195
|
+
default: w(() => [
|
|
191
196
|
O(C, { item: n }, null, 8, ["item"])
|
|
192
197
|
]),
|
|
193
198
|
_: 2
|
|
194
|
-
}, 1032, ["to"])) : (
|
|
199
|
+
}, 1032, ["to"])) : (i(), p(C, {
|
|
195
200
|
key: 1,
|
|
196
201
|
item: n
|
|
197
202
|
}, null, 8, ["item"]))
|
|
198
203
|
]))), 128))
|
|
199
204
|
]));
|
|
200
205
|
}
|
|
201
|
-
}),
|
|
206
|
+
}), ue = { class: "beam__navbar" }, de = { class: "navbar-action-wrapper" }, me = /* @__PURE__ */ d({
|
|
202
207
|
__name: "Navbar",
|
|
203
208
|
emits: ["click"],
|
|
204
|
-
setup(s, { emit:
|
|
205
|
-
const
|
|
206
|
-
|
|
209
|
+
setup(s, { emit: o }) {
|
|
210
|
+
const r = o, e = () => {
|
|
211
|
+
r("click");
|
|
207
212
|
};
|
|
208
|
-
return (t, a) => (
|
|
209
|
-
|
|
210
|
-
|
|
213
|
+
return (t, a) => (i(), u("nav", ue, [
|
|
214
|
+
v(t.$slots, "title", {}, () => [
|
|
215
|
+
a[0] || (a[0] = c("h1", { class: "nav-title" }, "TITLE", -1))
|
|
211
216
|
]),
|
|
212
|
-
|
|
213
|
-
|
|
217
|
+
c("div", de, [
|
|
218
|
+
c("button", {
|
|
214
219
|
class: "navbar-action btn",
|
|
215
220
|
onClick: e
|
|
216
221
|
}, [
|
|
217
|
-
|
|
218
|
-
U("Action")
|
|
222
|
+
v(t.$slots, "navbaraction", {}, () => [
|
|
223
|
+
a[1] || (a[1] = U("Action"))
|
|
219
224
|
])
|
|
220
225
|
])
|
|
221
226
|
])
|
|
222
227
|
]));
|
|
223
228
|
}
|
|
224
229
|
});
|
|
225
|
-
var
|
|
226
|
-
function
|
|
230
|
+
var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
231
|
+
function pe(s) {
|
|
227
232
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
228
233
|
}
|
|
229
|
-
var
|
|
230
|
-
(function(s,
|
|
231
|
-
(function(
|
|
234
|
+
var B = { exports: {} };
|
|
235
|
+
(function(s, o) {
|
|
236
|
+
(function(r, e) {
|
|
232
237
|
s.exports = e();
|
|
233
|
-
})(
|
|
234
|
-
var
|
|
238
|
+
})(fe, function() {
|
|
239
|
+
var r = {
|
|
235
240
|
/**
|
|
236
241
|
*
|
|
237
242
|
* @param DomElement oDomElement
|
|
@@ -242,23 +247,23 @@ var K = { exports: {} };
|
|
|
242
247
|
if (e.scannerDetectionData !== void 0)
|
|
243
248
|
throw new Error("onScan.js is already initialized for DOM element " + e);
|
|
244
249
|
var a = {
|
|
245
|
-
onScan: function(n,
|
|
250
|
+
onScan: function(n, l) {
|
|
246
251
|
},
|
|
247
252
|
// Callback after detection of a successfull scanning: function(){sScancode, iCount)}()
|
|
248
253
|
onScanError: function(n) {
|
|
249
254
|
},
|
|
250
255
|
// Callback after detection of a unsuccessfull scanning (scanned string in parameter)
|
|
251
|
-
onKeyProcess: function(n,
|
|
256
|
+
onKeyProcess: function(n, l) {
|
|
252
257
|
},
|
|
253
258
|
// Callback after receiving and processing a char (scanned char in parameter)
|
|
254
|
-
onKeyDetect: function(n,
|
|
259
|
+
onKeyDetect: function(n, l) {
|
|
255
260
|
},
|
|
256
261
|
// Callback after detecting a keyDown (key char in parameter) - in contrast to onKeyProcess, this fires for non-character keys like tab, arrows, etc. too!
|
|
257
|
-
onPaste: function(n,
|
|
262
|
+
onPaste: function(n, l) {
|
|
258
263
|
},
|
|
259
264
|
// Callback after receiving a value on paste, no matter if it is a valid code or not
|
|
260
265
|
keyCodeMapper: function(n) {
|
|
261
|
-
return
|
|
266
|
+
return r.decodeKeyEvent(n);
|
|
262
267
|
},
|
|
263
268
|
// Custom function to decode a keydown event into a character. Must return decoded character or NULL if the given event should not be processed.
|
|
264
269
|
onScanButtonLongPress: function() {
|
|
@@ -406,8 +411,8 @@ var K = { exports: {} };
|
|
|
406
411
|
return this._reinitialize(e), Array.isArray(t) ? t.forEach(function(a) {
|
|
407
412
|
var n = {};
|
|
408
413
|
(typeof a == "object" || typeof a == "function") && a !== null ? n = a : n.keyCode = parseInt(a);
|
|
409
|
-
var
|
|
410
|
-
document.dispatchEvent(
|
|
414
|
+
var l = new KeyboardEvent("keydown", n);
|
|
415
|
+
document.dispatchEvent(l);
|
|
411
416
|
}) : this._validateScanCode(e, t), this;
|
|
412
417
|
},
|
|
413
418
|
/**
|
|
@@ -445,33 +450,33 @@ var K = { exports: {} };
|
|
|
445
450
|
* @return boolean
|
|
446
451
|
*/
|
|
447
452
|
_validateScanCode: function(e, t) {
|
|
448
|
-
var a = e.scannerDetectionData, n = a.options,
|
|
453
|
+
var a = e.scannerDetectionData, n = a.options, l = a.options.singleScanQty, f = a.vars.firstCharTime, g = a.vars.lastCharTime, m = {}, _;
|
|
449
454
|
switch (!0) {
|
|
450
455
|
case t.length < n.minLength:
|
|
451
456
|
m = {
|
|
452
457
|
message: "Receieved code is shorter then minimal length"
|
|
453
458
|
};
|
|
454
459
|
break;
|
|
455
|
-
case
|
|
460
|
+
case g - f > t.length * n.avgTimeByChar:
|
|
456
461
|
m = {
|
|
457
462
|
message: "Receieved code was not entered in time"
|
|
458
463
|
};
|
|
459
464
|
break;
|
|
460
465
|
default:
|
|
461
|
-
return n.onScan.call(e, t,
|
|
466
|
+
return n.onScan.call(e, t, l), _ = new CustomEvent(
|
|
462
467
|
"scan",
|
|
463
468
|
{
|
|
464
469
|
detail: {
|
|
465
470
|
scanCode: t,
|
|
466
|
-
qty:
|
|
471
|
+
qty: l
|
|
467
472
|
}
|
|
468
473
|
}
|
|
469
|
-
), e.dispatchEvent(
|
|
474
|
+
), e.dispatchEvent(_), r._reinitialize(e), !0;
|
|
470
475
|
}
|
|
471
|
-
return m.scanCode = t, m.scanDuration =
|
|
476
|
+
return m.scanCode = t, m.scanDuration = g - f, m.avgTimeByChar = n.avgTimeByChar, m.minLength = n.minLength, n.onScanError.call(e, m), _ = new CustomEvent(
|
|
472
477
|
"scanError",
|
|
473
478
|
{ detail: m }
|
|
474
|
-
), e.dispatchEvent(
|
|
479
|
+
), e.dispatchEvent(_), r._reinitialize(e), !1;
|
|
475
480
|
},
|
|
476
481
|
/**
|
|
477
482
|
* @private
|
|
@@ -502,27 +507,27 @@ var K = { exports: {} };
|
|
|
502
507
|
* @return void
|
|
503
508
|
*/
|
|
504
509
|
_handleKeyDown: function(e) {
|
|
505
|
-
var t =
|
|
506
|
-
if (a.onKeyDetect.call(this, t, e) !== !1 && !
|
|
510
|
+
var t = r._getNormalizedKeyNum(e), a = this.scannerDetectionData.options, n = this.scannerDetectionData.vars, l = !1;
|
|
511
|
+
if (a.onKeyDetect.call(this, t, e) !== !1 && !r._isFocusOnIgnoredElement(this)) {
|
|
507
512
|
if (a.scanButtonKeyCode !== !1 && t == a.scanButtonKeyCode) {
|
|
508
513
|
n.longPressed || (n.longPressTimer = setTimeout(a.onScanButtonLongPress, a.scanButtonLongPressTime, this), n.longPressed = !0);
|
|
509
514
|
return;
|
|
510
515
|
}
|
|
511
516
|
switch (!0) {
|
|
512
517
|
case (n.firstCharTime && a.suffixKeyCodes.indexOf(t) !== -1):
|
|
513
|
-
e.preventDefault(), e.stopImmediatePropagation(),
|
|
518
|
+
e.preventDefault(), e.stopImmediatePropagation(), l = !0;
|
|
514
519
|
break;
|
|
515
520
|
case (!n.firstCharTime && a.prefixKeyCodes.indexOf(t) !== -1):
|
|
516
|
-
e.preventDefault(), e.stopImmediatePropagation(),
|
|
521
|
+
e.preventDefault(), e.stopImmediatePropagation(), l = !1;
|
|
517
522
|
break;
|
|
518
523
|
default:
|
|
519
524
|
var f = a.keyCodeMapper.call(this, e);
|
|
520
525
|
if (f === null)
|
|
521
526
|
return;
|
|
522
|
-
n.accumulatedString += f, a.preventDefault && e.preventDefault(), a.stopPropagation && e.stopImmediatePropagation(),
|
|
527
|
+
n.accumulatedString += f, a.preventDefault && e.preventDefault(), a.stopPropagation && e.stopImmediatePropagation(), l = !1;
|
|
523
528
|
break;
|
|
524
529
|
}
|
|
525
|
-
n.firstCharTime || (n.firstCharTime = Date.now()), n.lastCharTime = Date.now(), n.testTimer && clearTimeout(n.testTimer),
|
|
530
|
+
n.firstCharTime || (n.firstCharTime = Date.now()), n.lastCharTime = Date.now(), n.testTimer && clearTimeout(n.testTimer), l ? (r._validateScanCode(this, n.accumulatedString), n.testTimer = !1) : n.testTimer = setTimeout(r._validateScanCode, a.timeBeforeScanTest, this, n.accumulatedString), a.onKeyProcess.call(this, f, e);
|
|
526
531
|
}
|
|
527
532
|
},
|
|
528
533
|
/**
|
|
@@ -532,7 +537,7 @@ var K = { exports: {} };
|
|
|
532
537
|
*/
|
|
533
538
|
_handlePaste: function(e) {
|
|
534
539
|
var t = this.scannerDetectionData.options, a = this.scannerDetectionData.vars, n = (event.clipboardData || window.clipboardData).getData("text");
|
|
535
|
-
|
|
540
|
+
r._isFocusOnIgnoredElement(this) || (e.preventDefault(), t.stopPropagation && e.stopImmediatePropagation(), t.onPaste.call(this, n, event), a.firstCharTime = 0, a.lastCharTime = 0, r._validateScanCode(this, n));
|
|
536
541
|
},
|
|
537
542
|
/**
|
|
538
543
|
* @private
|
|
@@ -540,8 +545,8 @@ var K = { exports: {} };
|
|
|
540
545
|
* @return void
|
|
541
546
|
*/
|
|
542
547
|
_handleKeyUp: function(e) {
|
|
543
|
-
if (!
|
|
544
|
-
var t =
|
|
548
|
+
if (!r._isFocusOnIgnoredElement(this)) {
|
|
549
|
+
var t = r._getNormalizedKeyNum(e);
|
|
545
550
|
t == this.scannerDetectionData.options.scanButtonKeyCode && (clearTimeout(this.scannerDetectionData.vars.longPressTimer), this.scannerDetectionData.vars.longPressed = !1);
|
|
546
551
|
}
|
|
547
552
|
},
|
|
@@ -564,41 +569,41 @@ var K = { exports: {} };
|
|
|
564
569
|
return e.scannerDetectionData !== void 0;
|
|
565
570
|
}
|
|
566
571
|
};
|
|
567
|
-
return
|
|
572
|
+
return r;
|
|
568
573
|
});
|
|
569
|
-
})(
|
|
570
|
-
var
|
|
571
|
-
const
|
|
574
|
+
})(B);
|
|
575
|
+
var he = B.exports;
|
|
576
|
+
const b = /* @__PURE__ */ pe(he), ve = { id: "scan_input" }, _e = /* @__PURE__ */ d({
|
|
572
577
|
__name: "ScanInput",
|
|
573
578
|
props: {
|
|
574
579
|
scanHandler: { type: Function }
|
|
575
580
|
},
|
|
576
581
|
emits: ["scanInstance"],
|
|
577
|
-
setup(s, { emit:
|
|
578
|
-
const
|
|
579
|
-
return
|
|
580
|
-
const t =
|
|
581
|
-
|
|
582
|
+
setup(s, { emit: o }) {
|
|
583
|
+
const r = o, e = s;
|
|
584
|
+
return D(() => {
|
|
585
|
+
const t = b.attachTo(window, { onScan: e.scanHandler });
|
|
586
|
+
r("scanInstance", t);
|
|
582
587
|
}), $(() => {
|
|
583
|
-
|
|
584
|
-
}), (t, a) => (
|
|
588
|
+
b.detachFrom(window);
|
|
589
|
+
}), (t, a) => (i(), u("div", ve));
|
|
585
590
|
}
|
|
586
591
|
});
|
|
587
|
-
function
|
|
588
|
-
s.component("ActionFooter",
|
|
592
|
+
function Ce(s) {
|
|
593
|
+
s.component("ActionFooter", Q), s.component("BeamModal", R), s.component("BeamModalOutlet", G), s.component("Confirm", X), s.component("ItemCheck", K), s.component("ItemCount", L), s.component("ListAnchor", se), s.component("ListItem", C), s.component("ListView", le), s.component("Navbar", me), s.component("ScanInput", _e);
|
|
589
594
|
}
|
|
590
595
|
export {
|
|
591
|
-
|
|
596
|
+
Q as ActionFooter,
|
|
592
597
|
R as BeamModal,
|
|
593
|
-
|
|
598
|
+
G as BeamModalOutlet,
|
|
594
599
|
X as Confirm,
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
600
|
+
K as ItemCheck,
|
|
601
|
+
L as ItemCount,
|
|
602
|
+
se as ListAnchor,
|
|
598
603
|
C as ListItem,
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
604
|
+
le as ListView,
|
|
605
|
+
me as Navbar,
|
|
606
|
+
_e as ScanInput,
|
|
607
|
+
Ce as install
|
|
603
608
|
};
|
|
604
609
|
//# sourceMappingURL=beam.js.map
|