@stonecrop/beam 0.2.45 → 0.2.47
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 +305 -215
- package/dist/beam.js.map +1 -1
- package/dist/beam.umd.cjs +1 -1
- package/dist/beam.umd.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ActionFooter.vue +2 -2
- package/src/components/BeamArrow.vue +36 -0
- package/src/components/BeamBtn.vue +6 -0
- package/src/components/BeamHeading.vue +5 -0
- package/src/components/BeamMetadata.vue +1 -8
- package/src/components/BeamModal.vue +3 -3
- package/src/components/BeamModalOutlet.vue +1 -1
- package/src/components/BeamProgress.vue +29 -0
- package/src/components/Confirm.vue +3 -3
- package/src/components/ItemCount.vue +6 -2
- package/src/components/ListAnchor.vue +1 -1
- package/src/components/ListItem.vue +3 -3
- package/src/components/ListView.vue +1 -1
- package/src/components/Navbar.vue +5 -7
- package/src/components/SplitColumn.vue +45 -0
- package/src/index.ts +10 -0
package/dist/beam.js
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as u, openBlock as c, createElementBlock as l, createElementVNode as i, renderSlot as m, createTextVNode as b, normalizeClass as k, toDisplayString as _, createStaticVNode as N, resolveComponent as $, createBlock as h, withCtx as T, withDirectives as P, vShow as A, useModel as D, vModelCheckbox as x, mergeModels as z, computed as I, createCommentVNode as y, ref as O, onMounted as K, onUnmounted as L, Fragment as j, renderList as H, resolveDynamicComponent as U, createVNode as M, normalizeStyle as C } from "vue";
|
|
2
|
+
const Q = { class: "beam_action-footer" }, R = { class: "footer-action-wrapper" }, q = /* @__PURE__ */ u({
|
|
3
3
|
__name: "ActionFooter",
|
|
4
4
|
emits: ["click"],
|
|
5
|
-
setup(
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
setup(a, { emit: n }) {
|
|
6
|
+
const r = n, e = () => {
|
|
7
|
+
r("click");
|
|
8
8
|
};
|
|
9
|
-
return (t,
|
|
10
|
-
i("span",
|
|
9
|
+
return (t, s) => (c(), l("footer", Q, [
|
|
10
|
+
i("span", R, [
|
|
11
11
|
i("button", {
|
|
12
|
-
class: "
|
|
12
|
+
class: "beam_btn",
|
|
13
13
|
onClick: e
|
|
14
14
|
}, [
|
|
15
|
-
|
|
15
|
+
m(t.$slots, "default")
|
|
16
16
|
])
|
|
17
17
|
])
|
|
18
18
|
]));
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), G = { class: "beam_metadata" }, W = { class: "beam_metadata_content" }, Y = { class: "beam_metadata_block" }, J = { class: "beam_metadata_heading" }, X = /* @__PURE__ */ u({
|
|
21
21
|
__name: "BeamMetadata",
|
|
22
22
|
props: {
|
|
23
23
|
order: {}
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
return (
|
|
27
|
-
i("div",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
i("div",
|
|
31
|
-
i("p",
|
|
32
|
-
|
|
25
|
+
setup(a) {
|
|
26
|
+
return (n, r) => (c(), l("div", G, [
|
|
27
|
+
i("div", W, [
|
|
28
|
+
m(n.$slots, "default", {}, () => [
|
|
29
|
+
r[1] || (r[1] = i("div", { class: "beam_metadata_header beam_metadata--two-column" }, null, -1)),
|
|
30
|
+
i("div", Y, [
|
|
31
|
+
i("p", J, [
|
|
32
|
+
r[0] || (r[0] = b(" Status: ")),
|
|
33
33
|
i("span", {
|
|
34
|
-
class: k([{ alert: !
|
|
35
|
-
},
|
|
34
|
+
class: k([{ alert: !n.order.complete }, "beam_metadata--normal"])
|
|
35
|
+
}, _(n.order.complete ? "Complete" : "In Progress"), 3)
|
|
36
36
|
])
|
|
37
37
|
]),
|
|
38
|
-
|
|
38
|
+
r[2] || (r[2] = N('<div class="beam_metadata_shipping beam_metadata_block"><div class="beam_metadata_source"><p class="beam_metadata_heading">Source</p></div><div class="beam_metadata_source"><p class="beam_metadata_heading">Receiving</p></div></div>', 1))
|
|
39
39
|
])
|
|
40
40
|
])
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
43
|
+
}), Z = { class: "beam_modal" }, ee = /* @__PURE__ */ u({
|
|
44
44
|
__name: "BeamModal",
|
|
45
45
|
props: {
|
|
46
46
|
showModal: { type: Boolean }
|
|
47
47
|
},
|
|
48
|
-
setup(
|
|
49
|
-
return (
|
|
50
|
-
const e =
|
|
51
|
-
return c(),
|
|
52
|
-
default:
|
|
53
|
-
|
|
48
|
+
setup(a) {
|
|
49
|
+
return (n, r) => {
|
|
50
|
+
const e = $("portal");
|
|
51
|
+
return c(), h(e, { to: "beam_modal_outlet" }, {
|
|
52
|
+
default: T(() => [
|
|
53
|
+
P(i("div", Z, [
|
|
54
54
|
i("button", {
|
|
55
|
-
class: "
|
|
56
|
-
onClick:
|
|
55
|
+
class: "beam_btn",
|
|
56
|
+
onClick: r[0] || (r[0] = (t) => n.$emit("closemodal"))
|
|
57
57
|
}, "Close Modal"),
|
|
58
|
-
|
|
59
|
-
onClosemodal:
|
|
60
|
-
onConfirmmodal:
|
|
58
|
+
m(n.$slots, "default", {
|
|
59
|
+
onClosemodal: r[1] || (r[1] = (t) => n.$emit("closemodal")),
|
|
60
|
+
onConfirmmodal: r[2] || (r[2] = (t) => n.$emit("confirmmodal"))
|
|
61
61
|
})
|
|
62
62
|
], 512), [
|
|
63
|
-
[
|
|
63
|
+
[A, n.showModal]
|
|
64
64
|
])
|
|
65
65
|
]),
|
|
66
66
|
_: 3
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
}),
|
|
70
|
+
}), te = /* @__PURE__ */ u({
|
|
71
71
|
__name: "BeamModalOutlet",
|
|
72
72
|
emits: ["confirmmodal", "closemodal"],
|
|
73
|
-
setup(
|
|
74
|
-
return (
|
|
75
|
-
const e =
|
|
76
|
-
return c(),
|
|
73
|
+
setup(a) {
|
|
74
|
+
return (n, r) => {
|
|
75
|
+
const e = $("portal-target");
|
|
76
|
+
return c(), h(e, { name: "beam_modal_outlet" });
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
}),
|
|
80
|
-
const
|
|
81
|
-
for (const [e, t] of
|
|
82
|
-
|
|
83
|
-
return
|
|
84
|
-
},
|
|
85
|
-
function
|
|
86
|
-
return c(),
|
|
87
|
-
|
|
79
|
+
}), v = (a, n) => {
|
|
80
|
+
const r = a.__vccOpts || a;
|
|
81
|
+
for (const [e, t] of n)
|
|
82
|
+
r[e] = t;
|
|
83
|
+
return r;
|
|
84
|
+
}, ne = {}, ae = { class: "beam_modal-confirm" };
|
|
85
|
+
function oe(a, n) {
|
|
86
|
+
return c(), l("div", ae, [
|
|
87
|
+
n[2] || (n[2] = i("h2", null, "Would you like to continue?", -1)),
|
|
88
88
|
i("button", {
|
|
89
|
-
class: "
|
|
90
|
-
onClick:
|
|
89
|
+
class: "beam_btn",
|
|
90
|
+
onClick: n[0] || (n[0] = (r) => a.$emit("confirmmodal"))
|
|
91
91
|
}, "Yes"),
|
|
92
92
|
i("button", {
|
|
93
|
-
class: "
|
|
94
|
-
onClick:
|
|
93
|
+
class: "beam_btn",
|
|
94
|
+
onClick: n[1] || (n[1] = (r) => a.$emit("closemodal"))
|
|
95
95
|
}, "No")
|
|
96
96
|
]);
|
|
97
97
|
}
|
|
98
|
-
const
|
|
98
|
+
const se = /* @__PURE__ */ v(ne, [["render", oe]]), re = { class: "container" }, ie = /* @__PURE__ */ u({
|
|
99
99
|
__name: "ItemCheck",
|
|
100
100
|
props: {
|
|
101
101
|
modelValue: { type: Boolean, default: !1 },
|
|
102
102
|
modelModifiers: {}
|
|
103
103
|
},
|
|
104
104
|
emits: ["update:modelValue"],
|
|
105
|
-
setup(
|
|
106
|
-
const
|
|
107
|
-
return (
|
|
108
|
-
|
|
105
|
+
setup(a) {
|
|
106
|
+
const n = D(a, "modelValue");
|
|
107
|
+
return (r, e) => (c(), l("label", re, [
|
|
108
|
+
P(i("input", {
|
|
109
109
|
type: "checkbox",
|
|
110
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
110
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => n.value = t),
|
|
111
111
|
tabindex: "-1"
|
|
112
112
|
}, null, 512), [
|
|
113
|
-
[
|
|
113
|
+
[x, n.value]
|
|
114
114
|
]),
|
|
115
115
|
e[1] || (e[1] = i("div", {
|
|
116
116
|
class: "checkmark",
|
|
@@ -118,9 +118,9 @@ const oe = /* @__PURE__ */ K(te, [["render", ae]]), se = { class: "container" },
|
|
|
118
118
|
}, null, -1))
|
|
119
119
|
]));
|
|
120
120
|
}
|
|
121
|
-
}),
|
|
121
|
+
}), V = /* @__PURE__ */ v(ie, [["__scopeId", "data-v-f44a510e"]]), ce = { class: "beam_item-count" }, le = ["contenteditable"], ue = { key: 0 }, E = /* @__PURE__ */ u({
|
|
122
122
|
__name: "ItemCount",
|
|
123
|
-
props: /* @__PURE__ */
|
|
123
|
+
props: /* @__PURE__ */ z({
|
|
124
124
|
denominator: {},
|
|
125
125
|
uom: { default: "" },
|
|
126
126
|
editable: { type: Boolean, default: !0 }
|
|
@@ -129,137 +129,143 @@ const oe = /* @__PURE__ */ K(te, [["render", ae]]), se = { class: "container" },
|
|
|
129
129
|
modelModifiers: {}
|
|
130
130
|
}),
|
|
131
131
|
emits: ["update:modelValue"],
|
|
132
|
-
setup(
|
|
133
|
-
const
|
|
132
|
+
setup(a) {
|
|
133
|
+
const n = D(a, "modelValue"), r = I(() => n.value === a.denominator), e = (t) => {
|
|
134
134
|
t.preventDefault(), t.stopPropagation();
|
|
135
|
-
const
|
|
136
|
-
|
|
135
|
+
const s = Number(t.target.innerHTML) || 0;
|
|
136
|
+
n.value = Math.min(s, a.denominator);
|
|
137
137
|
};
|
|
138
|
-
return (t,
|
|
138
|
+
return (t, s) => (c(), l("div", ce, [
|
|
139
139
|
i("span", {
|
|
140
140
|
contenteditable: t.editable,
|
|
141
|
-
class: k({ alert: !
|
|
141
|
+
class: k({ "beam--alert": !r.value }),
|
|
142
142
|
onInput: e,
|
|
143
143
|
onClick: e
|
|
144
|
-
},
|
|
145
|
-
i("span", null, "/" +
|
|
146
|
-
t.uom ? (c(),
|
|
144
|
+
}, _(n.value), 43, le),
|
|
145
|
+
i("span", null, "/" + _(t.denominator), 1),
|
|
146
|
+
t.uom ? (c(), l("span", ue, " " + _(t.uom), 1)) : y("", !0)
|
|
147
147
|
]));
|
|
148
148
|
}
|
|
149
|
-
}),
|
|
149
|
+
}), de = ["href"], me = /* @__PURE__ */ u({
|
|
150
150
|
__name: "ListAnchor",
|
|
151
151
|
props: {
|
|
152
152
|
to: { default: "" }
|
|
153
153
|
},
|
|
154
|
-
setup(
|
|
155
|
-
return (
|
|
156
|
-
href:
|
|
157
|
-
class: "
|
|
154
|
+
setup(a) {
|
|
155
|
+
return (n, r) => (c(), l("a", {
|
|
156
|
+
href: n.to,
|
|
157
|
+
class: "beam_list-anchor"
|
|
158
158
|
}, [
|
|
159
|
-
|
|
160
|
-
], 8,
|
|
159
|
+
m(n.$slots, "default")
|
|
160
|
+
], 8, de));
|
|
161
161
|
}
|
|
162
|
-
}),
|
|
162
|
+
}), fe = {
|
|
163
163
|
tabindex: "0",
|
|
164
|
-
class: "
|
|
165
|
-
},
|
|
164
|
+
class: "beam_list-item"
|
|
165
|
+
}, _e = { class: "beam_list-text" }, pe = { class: "beam--bold" }, w = /* @__PURE__ */ u({
|
|
166
166
|
__name: "ListItem",
|
|
167
167
|
props: {
|
|
168
168
|
item: {}
|
|
169
169
|
},
|
|
170
|
-
setup(
|
|
171
|
-
const
|
|
172
|
-
return (
|
|
173
|
-
i("div",
|
|
174
|
-
i("label",
|
|
175
|
-
i("p", null,
|
|
170
|
+
setup(a) {
|
|
171
|
+
const n = O(a.item);
|
|
172
|
+
return (r, e) => (c(), l("li", fe, [
|
|
173
|
+
i("div", _e, [
|
|
174
|
+
i("label", pe, _(n.value.label), 1),
|
|
175
|
+
i("p", null, _(n.value.description), 1)
|
|
176
176
|
]),
|
|
177
|
-
|
|
177
|
+
n.value.count ? (c(), h(E, {
|
|
178
178
|
key: 0,
|
|
179
|
-
modelValue:
|
|
180
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
181
|
-
denominator:
|
|
182
|
-
uom:
|
|
179
|
+
modelValue: n.value.count.count,
|
|
180
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => n.value.count.count = t),
|
|
181
|
+
denominator: n.value.count.of,
|
|
182
|
+
uom: n.value.count.uom,
|
|
183
183
|
editable: !0
|
|
184
184
|
}, null, 8, ["modelValue", "denominator", "uom"])) : y("", !0),
|
|
185
|
-
|
|
185
|
+
n.value.hasOwnProperty("checked") ? (c(), h(V, {
|
|
186
186
|
key: 1,
|
|
187
|
-
modelValue:
|
|
188
|
-
"onUpdate:modelValue": e[1] || (e[1] = (t) =>
|
|
187
|
+
modelValue: n.value.checked,
|
|
188
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => n.value.checked = t)
|
|
189
189
|
}, null, 8, ["modelValue"])) : y("", !0)
|
|
190
190
|
]));
|
|
191
191
|
}
|
|
192
|
-
}),
|
|
192
|
+
}), he = { class: "beam_list-view" }, ve = /* @__PURE__ */ u({
|
|
193
193
|
__name: "ListView",
|
|
194
194
|
props: {
|
|
195
195
|
items: {}
|
|
196
196
|
},
|
|
197
197
|
emits: ["scrollbottom"],
|
|
198
|
-
setup(
|
|
199
|
-
const
|
|
200
|
-
|
|
198
|
+
setup(a, { emit: n }) {
|
|
199
|
+
const r = n;
|
|
200
|
+
K(() => {
|
|
201
201
|
window.addEventListener("scroll", e);
|
|
202
|
-
}),
|
|
202
|
+
}), L(() => {
|
|
203
203
|
window.removeEventListener("scroll", e);
|
|
204
204
|
});
|
|
205
205
|
const e = () => {
|
|
206
|
-
const t = document.documentElement.scrollHeight - window.innerHeight,
|
|
207
|
-
t -
|
|
206
|
+
const t = document.documentElement.scrollHeight - window.innerHeight, s = document.documentElement.scrollTop;
|
|
207
|
+
t - s <= 2 && r("scrollbottom");
|
|
208
208
|
};
|
|
209
|
-
return (t,
|
|
210
|
-
(c(!0),
|
|
211
|
-
key:
|
|
209
|
+
return (t, s) => (c(), l("ul", he, [
|
|
210
|
+
(c(!0), l(j, null, H(t.items, (o) => (c(), l("li", {
|
|
211
|
+
key: o.label
|
|
212
212
|
}, [
|
|
213
|
-
|
|
213
|
+
o.linkComponent ? (c(), h(U(o.linkComponent), {
|
|
214
214
|
key: 0,
|
|
215
|
-
to:
|
|
215
|
+
to: o.route,
|
|
216
216
|
tabindex: "-1"
|
|
217
217
|
}, {
|
|
218
|
-
default:
|
|
219
|
-
|
|
218
|
+
default: T(() => [
|
|
219
|
+
M(w, { item: o }, null, 8, ["item"])
|
|
220
220
|
]),
|
|
221
221
|
_: 2
|
|
222
|
-
}, 1032, ["to"])) : (c(),
|
|
222
|
+
}, 1032, ["to"])) : (c(), h(w, {
|
|
223
223
|
key: 1,
|
|
224
|
-
item:
|
|
224
|
+
item: o
|
|
225
225
|
}, null, 8, ["item"]))
|
|
226
226
|
]))), 128))
|
|
227
227
|
]));
|
|
228
228
|
}
|
|
229
|
-
}),
|
|
229
|
+
}), be = { class: "beam_navbar" }, ge = /* @__PURE__ */ u({
|
|
230
230
|
__name: "Navbar",
|
|
231
231
|
emits: ["click"],
|
|
232
|
-
setup(
|
|
233
|
-
const
|
|
234
|
-
|
|
232
|
+
setup(a, { emit: n }) {
|
|
233
|
+
const r = n, e = () => {
|
|
234
|
+
r("click");
|
|
235
235
|
};
|
|
236
|
-
return (t,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
return (t, s) => {
|
|
237
|
+
const o = $("BeamHeading");
|
|
238
|
+
return c(), l("nav", be, [
|
|
239
|
+
m(t.$slots, "title", {}, () => [
|
|
240
|
+
M(o, null, {
|
|
241
|
+
default: T(() => s[0] || (s[0] = [
|
|
242
|
+
b("TITLE")
|
|
243
|
+
])),
|
|
244
|
+
_: 1
|
|
245
|
+
})
|
|
246
|
+
]),
|
|
241
247
|
i("button", {
|
|
242
|
-
class: "navbar-action
|
|
248
|
+
class: "navbar-action beam_btn",
|
|
243
249
|
onClick: e
|
|
244
250
|
}, [
|
|
245
|
-
|
|
246
|
-
|
|
251
|
+
m(t.$slots, "navbaraction", {}, () => [
|
|
252
|
+
s[1] || (s[1] = b("Action"))
|
|
247
253
|
])
|
|
248
254
|
])
|
|
249
|
-
])
|
|
250
|
-
|
|
255
|
+
]);
|
|
256
|
+
};
|
|
251
257
|
}
|
|
252
258
|
});
|
|
253
|
-
var
|
|
254
|
-
function
|
|
255
|
-
return
|
|
259
|
+
var ye = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
260
|
+
function Ce(a) {
|
|
261
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
256
262
|
}
|
|
257
|
-
var
|
|
258
|
-
(function(
|
|
259
|
-
(function(
|
|
260
|
-
|
|
261
|
-
})(
|
|
262
|
-
var
|
|
263
|
+
var F = { exports: {} };
|
|
264
|
+
(function(a, n) {
|
|
265
|
+
(function(r, e) {
|
|
266
|
+
a.exports = e();
|
|
267
|
+
})(ye, function() {
|
|
268
|
+
var r = {
|
|
263
269
|
/**
|
|
264
270
|
*
|
|
265
271
|
* @param DomElement oDomElement
|
|
@@ -269,24 +275,24 @@ var V = { exports: {} };
|
|
|
269
275
|
attachTo: function(e, t) {
|
|
270
276
|
if (e.scannerDetectionData !== void 0)
|
|
271
277
|
throw new Error("onScan.js is already initialized for DOM element " + e);
|
|
272
|
-
var
|
|
273
|
-
onScan: function(
|
|
278
|
+
var s = {
|
|
279
|
+
onScan: function(o, d) {
|
|
274
280
|
},
|
|
275
281
|
// Callback after detection of a successfull scanning: function(){sScancode, iCount)}()
|
|
276
|
-
onScanError: function(
|
|
282
|
+
onScanError: function(o) {
|
|
277
283
|
},
|
|
278
284
|
// Callback after detection of a unsuccessfull scanning (scanned string in parameter)
|
|
279
|
-
onKeyProcess: function(
|
|
285
|
+
onKeyProcess: function(o, d) {
|
|
280
286
|
},
|
|
281
287
|
// Callback after receiving and processing a char (scanned char in parameter)
|
|
282
|
-
onKeyDetect: function(
|
|
288
|
+
onKeyDetect: function(o, d) {
|
|
283
289
|
},
|
|
284
290
|
// Callback after detecting a keyDown (key char in parameter) - in contrast to onKeyProcess, this fires for non-character keys like tab, arrows, etc. too!
|
|
285
|
-
onPaste: function(
|
|
291
|
+
onPaste: function(o, d) {
|
|
286
292
|
},
|
|
287
293
|
// Callback after receiving a value on paste, no matter if it is a valid code or not
|
|
288
|
-
keyCodeMapper: function(
|
|
289
|
-
return
|
|
294
|
+
keyCodeMapper: function(o) {
|
|
295
|
+
return r.decodeKeyEvent(o);
|
|
290
296
|
},
|
|
291
297
|
// Custom function to decode a keydown event into a character. Must return decoded character or NULL if the given event should not be processed.
|
|
292
298
|
onScanButtonLongPress: function() {
|
|
@@ -321,7 +327,7 @@ var V = { exports: {} };
|
|
|
321
327
|
singleScanQty: 1
|
|
322
328
|
// Quantity of Items put out to onScan in a single scan
|
|
323
329
|
};
|
|
324
|
-
return t = this._mergeOptions(
|
|
330
|
+
return t = this._mergeOptions(s, t), e.scannerDetectionData = {
|
|
325
331
|
options: t,
|
|
326
332
|
vars: {
|
|
327
333
|
firstCharTime: 0,
|
|
@@ -399,16 +405,16 @@ var V = { exports: {} };
|
|
|
399
405
|
case (t >= 106 && t <= 111):
|
|
400
406
|
if (e.key !== void 0 && e.key !== "")
|
|
401
407
|
return e.key;
|
|
402
|
-
var
|
|
408
|
+
var s = String.fromCharCode(t);
|
|
403
409
|
switch (e.shiftKey) {
|
|
404
410
|
case !1:
|
|
405
|
-
|
|
411
|
+
s = s.toLowerCase();
|
|
406
412
|
break;
|
|
407
413
|
case !0:
|
|
408
|
-
|
|
414
|
+
s = s.toUpperCase();
|
|
409
415
|
break;
|
|
410
416
|
}
|
|
411
|
-
return
|
|
417
|
+
return s;
|
|
412
418
|
case (t >= 96 && t <= 105):
|
|
413
419
|
return 0 + (t - 96);
|
|
414
420
|
}
|
|
@@ -431,11 +437,11 @@ var V = { exports: {} };
|
|
|
431
437
|
* @return self
|
|
432
438
|
*/
|
|
433
439
|
simulate: function(e, t) {
|
|
434
|
-
return this._reinitialize(e), Array.isArray(t) ? t.forEach(function(
|
|
435
|
-
var
|
|
436
|
-
(typeof
|
|
437
|
-
var
|
|
438
|
-
document.dispatchEvent(
|
|
440
|
+
return this._reinitialize(e), Array.isArray(t) ? t.forEach(function(s) {
|
|
441
|
+
var o = {};
|
|
442
|
+
(typeof s == "object" || typeof s == "function") && s !== null ? o = s : o.keyCode = parseInt(s);
|
|
443
|
+
var d = new KeyboardEvent("keydown", o);
|
|
444
|
+
document.dispatchEvent(d);
|
|
439
445
|
}) : this._validateScanCode(e, t), this;
|
|
440
446
|
},
|
|
441
447
|
/**
|
|
@@ -456,12 +462,12 @@ var V = { exports: {} };
|
|
|
456
462
|
var t = e.scannerDetectionData.options.ignoreIfFocusOn;
|
|
457
463
|
if (!t)
|
|
458
464
|
return !1;
|
|
459
|
-
var
|
|
465
|
+
var s = document.activeElement;
|
|
460
466
|
if (Array.isArray(t)) {
|
|
461
|
-
for (var
|
|
462
|
-
if (
|
|
467
|
+
for (var o = 0; o < t.length; o++)
|
|
468
|
+
if (s.matches(t[o]) === !0)
|
|
463
469
|
return !0;
|
|
464
|
-
} else if (
|
|
470
|
+
} else if (s.matches(t))
|
|
465
471
|
return !0;
|
|
466
472
|
return !1;
|
|
467
473
|
},
|
|
@@ -473,33 +479,33 @@ var V = { exports: {} };
|
|
|
473
479
|
* @return boolean
|
|
474
480
|
*/
|
|
475
481
|
_validateScanCode: function(e, t) {
|
|
476
|
-
var
|
|
482
|
+
var s = e.scannerDetectionData, o = s.options, d = s.options.singleScanQty, p = s.vars.firstCharTime, B = s.vars.lastCharTime, f = {}, g;
|
|
477
483
|
switch (!0) {
|
|
478
|
-
case t.length <
|
|
479
|
-
|
|
484
|
+
case t.length < o.minLength:
|
|
485
|
+
f = {
|
|
480
486
|
message: "Receieved code is shorter then minimal length"
|
|
481
487
|
};
|
|
482
488
|
break;
|
|
483
|
-
case
|
|
484
|
-
|
|
489
|
+
case B - p > t.length * o.avgTimeByChar:
|
|
490
|
+
f = {
|
|
485
491
|
message: "Receieved code was not entered in time"
|
|
486
492
|
};
|
|
487
493
|
break;
|
|
488
494
|
default:
|
|
489
|
-
return
|
|
495
|
+
return o.onScan.call(e, t, d), g = new CustomEvent(
|
|
490
496
|
"scan",
|
|
491
497
|
{
|
|
492
498
|
detail: {
|
|
493
499
|
scanCode: t,
|
|
494
|
-
qty:
|
|
500
|
+
qty: d
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
|
-
), e.dispatchEvent(
|
|
503
|
+
), e.dispatchEvent(g), r._reinitialize(e), !0;
|
|
498
504
|
}
|
|
499
|
-
return
|
|
505
|
+
return f.scanCode = t, f.scanDuration = B - p, f.avgTimeByChar = o.avgTimeByChar, f.minLength = o.minLength, o.onScanError.call(e, f), g = new CustomEvent(
|
|
500
506
|
"scanError",
|
|
501
|
-
{ detail:
|
|
502
|
-
), e.dispatchEvent(
|
|
507
|
+
{ detail: f }
|
|
508
|
+
), e.dispatchEvent(g), r._reinitialize(e), !1;
|
|
503
509
|
},
|
|
504
510
|
/**
|
|
505
511
|
* @private
|
|
@@ -508,12 +514,12 @@ var V = { exports: {} };
|
|
|
508
514
|
* @return Object
|
|
509
515
|
*/
|
|
510
516
|
_mergeOptions: function(e, t) {
|
|
511
|
-
var
|
|
512
|
-
for (
|
|
513
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
514
|
-
for (
|
|
515
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
516
|
-
return
|
|
517
|
+
var s = {}, o;
|
|
518
|
+
for (o in e)
|
|
519
|
+
Object.prototype.hasOwnProperty.call(e, o) && (s[o] = e[o]);
|
|
520
|
+
for (o in t)
|
|
521
|
+
Object.prototype.hasOwnProperty.call(t, o) && (s[o] = t[o]);
|
|
522
|
+
return s;
|
|
517
523
|
},
|
|
518
524
|
/**
|
|
519
525
|
* @private
|
|
@@ -530,27 +536,27 @@ var V = { exports: {} };
|
|
|
530
536
|
* @return void
|
|
531
537
|
*/
|
|
532
538
|
_handleKeyDown: function(e) {
|
|
533
|
-
var t =
|
|
534
|
-
if (
|
|
535
|
-
if (
|
|
536
|
-
|
|
539
|
+
var t = r._getNormalizedKeyNum(e), s = this.scannerDetectionData.options, o = this.scannerDetectionData.vars, d = !1;
|
|
540
|
+
if (s.onKeyDetect.call(this, t, e) !== !1 && !r._isFocusOnIgnoredElement(this)) {
|
|
541
|
+
if (s.scanButtonKeyCode !== !1 && t == s.scanButtonKeyCode) {
|
|
542
|
+
o.longPressed || (o.longPressTimer = setTimeout(s.onScanButtonLongPress, s.scanButtonLongPressTime, this), o.longPressed = !0);
|
|
537
543
|
return;
|
|
538
544
|
}
|
|
539
545
|
switch (!0) {
|
|
540
|
-
case (
|
|
541
|
-
e.preventDefault(), e.stopImmediatePropagation(),
|
|
546
|
+
case (o.firstCharTime && s.suffixKeyCodes.indexOf(t) !== -1):
|
|
547
|
+
e.preventDefault(), e.stopImmediatePropagation(), d = !0;
|
|
542
548
|
break;
|
|
543
|
-
case (!
|
|
544
|
-
e.preventDefault(), e.stopImmediatePropagation(),
|
|
549
|
+
case (!o.firstCharTime && s.prefixKeyCodes.indexOf(t) !== -1):
|
|
550
|
+
e.preventDefault(), e.stopImmediatePropagation(), d = !1;
|
|
545
551
|
break;
|
|
546
552
|
default:
|
|
547
|
-
var
|
|
548
|
-
if (
|
|
553
|
+
var p = s.keyCodeMapper.call(this, e);
|
|
554
|
+
if (p === null)
|
|
549
555
|
return;
|
|
550
|
-
|
|
556
|
+
o.accumulatedString += p, s.preventDefault && e.preventDefault(), s.stopPropagation && e.stopImmediatePropagation(), d = !1;
|
|
551
557
|
break;
|
|
552
558
|
}
|
|
553
|
-
|
|
559
|
+
o.firstCharTime || (o.firstCharTime = Date.now()), o.lastCharTime = Date.now(), o.testTimer && clearTimeout(o.testTimer), d ? (r._validateScanCode(this, o.accumulatedString), o.testTimer = !1) : o.testTimer = setTimeout(r._validateScanCode, s.timeBeforeScanTest, this, o.accumulatedString), s.onKeyProcess.call(this, p, e);
|
|
554
560
|
}
|
|
555
561
|
},
|
|
556
562
|
/**
|
|
@@ -559,8 +565,8 @@ var V = { exports: {} };
|
|
|
559
565
|
* @return void
|
|
560
566
|
*/
|
|
561
567
|
_handlePaste: function(e) {
|
|
562
|
-
var t = this.scannerDetectionData.options,
|
|
563
|
-
|
|
568
|
+
var t = this.scannerDetectionData.options, s = this.scannerDetectionData.vars, o = (event.clipboardData || window.clipboardData).getData("text");
|
|
569
|
+
r._isFocusOnIgnoredElement(this) || (e.preventDefault(), t.stopPropagation && e.stopImmediatePropagation(), t.onPaste.call(this, o, event), s.firstCharTime = 0, s.lastCharTime = 0, r._validateScanCode(this, o));
|
|
564
570
|
},
|
|
565
571
|
/**
|
|
566
572
|
* @private
|
|
@@ -568,8 +574,8 @@ var V = { exports: {} };
|
|
|
568
574
|
* @return void
|
|
569
575
|
*/
|
|
570
576
|
_handleKeyUp: function(e) {
|
|
571
|
-
if (!
|
|
572
|
-
var t =
|
|
577
|
+
if (!r._isFocusOnIgnoredElement(this)) {
|
|
578
|
+
var t = r._getNormalizedKeyNum(e);
|
|
573
579
|
t == this.scannerDetectionData.options.scanButtonKeyCode && (clearTimeout(this.scannerDetectionData.vars.longPressTimer), this.scannerDetectionData.vars.longPressed = !1);
|
|
574
580
|
}
|
|
575
581
|
},
|
|
@@ -592,42 +598,126 @@ var V = { exports: {} };
|
|
|
592
598
|
return e.scannerDetectionData !== void 0;
|
|
593
599
|
}
|
|
594
600
|
};
|
|
595
|
-
return
|
|
601
|
+
return r;
|
|
596
602
|
});
|
|
597
|
-
})(
|
|
598
|
-
var
|
|
599
|
-
const
|
|
603
|
+
})(F);
|
|
604
|
+
var we = F.exports;
|
|
605
|
+
const S = /* @__PURE__ */ Ce(we), ke = { id: "scan_input" }, $e = /* @__PURE__ */ u({
|
|
600
606
|
__name: "ScanInput",
|
|
601
607
|
props: {
|
|
602
608
|
scanHandler: { type: Function }
|
|
603
609
|
},
|
|
604
610
|
emits: ["scanInstance"],
|
|
605
|
-
setup(
|
|
606
|
-
const
|
|
607
|
-
return
|
|
608
|
-
const t =
|
|
609
|
-
|
|
610
|
-
}),
|
|
611
|
-
|
|
612
|
-
}), (t,
|
|
611
|
+
setup(a, { emit: n }) {
|
|
612
|
+
const r = n, e = a;
|
|
613
|
+
return K(() => {
|
|
614
|
+
const t = S.attachTo(window, { onScan: e.scanHandler });
|
|
615
|
+
r("scanInstance", t);
|
|
616
|
+
}), L(() => {
|
|
617
|
+
S.detachFrom(window);
|
|
618
|
+
}), (t, s) => (c(), l("div", ke));
|
|
619
|
+
}
|
|
620
|
+
}), Te = { class: "column column-left" }, Be = { class: "column column-right" }, Se = /* @__PURE__ */ u({
|
|
621
|
+
__name: "SplitColumn",
|
|
622
|
+
props: {
|
|
623
|
+
justifyContent: {},
|
|
624
|
+
alignItems: {}
|
|
625
|
+
},
|
|
626
|
+
setup(a) {
|
|
627
|
+
return (n, r) => (c(), l("div", {
|
|
628
|
+
class: "two-column",
|
|
629
|
+
style: C({ justifyContent: n.justifyContent || "space-between", alignItems: n.alignItems || "flex-start" })
|
|
630
|
+
}, [
|
|
631
|
+
i("div", Te, [
|
|
632
|
+
m(n.$slots, "left", {}, void 0, !0)
|
|
633
|
+
]),
|
|
634
|
+
i("div", Be, [
|
|
635
|
+
m(n.$slots, "right", {}, void 0, !0)
|
|
636
|
+
])
|
|
637
|
+
], 4));
|
|
638
|
+
}
|
|
639
|
+
}), Pe = /* @__PURE__ */ v(Se, [["__scopeId", "data-v-5d4573e9"]]), De = {}, Ie = { class: "beam_header" };
|
|
640
|
+
function Ke(a, n) {
|
|
641
|
+
return c(), l("h1", Ie, [
|
|
642
|
+
m(a.$slots, "default")
|
|
643
|
+
]);
|
|
644
|
+
}
|
|
645
|
+
const Le = /* @__PURE__ */ v(De, [["render", Ke]]), Me = { class: "beam_metadata_arrow" }, Ve = { class: "beam_metadata_arrow-head" }, Ee = {
|
|
646
|
+
id: "Layer_1",
|
|
647
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
648
|
+
viewBox: "0 0 6.74 7.78"
|
|
649
|
+
}, Fe = /* @__PURE__ */ u({
|
|
650
|
+
__name: "BeamArrow",
|
|
651
|
+
props: {
|
|
652
|
+
color: String
|
|
653
|
+
},
|
|
654
|
+
setup(a) {
|
|
655
|
+
return (n, r) => (c(), l("div", Me, [
|
|
656
|
+
i("div", {
|
|
657
|
+
class: "beam_metadata_arrow-body",
|
|
658
|
+
style: C({ background: a.color || "#c4c4c4" })
|
|
659
|
+
}, null, 4),
|
|
660
|
+
i("div", Ve, [
|
|
661
|
+
(c(), l("svg", Ee, [
|
|
662
|
+
i("polygon", {
|
|
663
|
+
points: "6.74 3.89 0 0 0 7.78 6.74 3.89",
|
|
664
|
+
style: C([{ fill: "#c4c4c4" }, { fill: a.color || "#c4c4c4" }])
|
|
665
|
+
}, null, 4)
|
|
666
|
+
]))
|
|
667
|
+
])
|
|
668
|
+
]));
|
|
669
|
+
}
|
|
670
|
+
}), Ne = /* @__PURE__ */ v(Fe, [["__scopeId", "data-v-e3223427"]]), Ae = {}, xe = { class: "beam_btn" };
|
|
671
|
+
function ze(a, n) {
|
|
672
|
+
return c(), l("button", xe, [
|
|
673
|
+
m(a.$slots, "default", {}, () => [
|
|
674
|
+
n[0] || (n[0] = b("Action"))
|
|
675
|
+
])
|
|
676
|
+
]);
|
|
677
|
+
}
|
|
678
|
+
const Oe = /* @__PURE__ */ v(Ae, [["render", ze]]), je = { class: "beam_metadata_heading" }, He = /* @__PURE__ */ u({
|
|
679
|
+
__name: "BeamProgress",
|
|
680
|
+
props: {
|
|
681
|
+
label: {
|
|
682
|
+
type: String,
|
|
683
|
+
default: "Status"
|
|
684
|
+
},
|
|
685
|
+
progressMessage: {
|
|
686
|
+
type: String,
|
|
687
|
+
default: "In Progress"
|
|
688
|
+
},
|
|
689
|
+
completeMessage: {
|
|
690
|
+
type: String,
|
|
691
|
+
default: "Complete"
|
|
692
|
+
},
|
|
693
|
+
complete: Boolean
|
|
694
|
+
},
|
|
695
|
+
setup(a) {
|
|
696
|
+
const n = a, r = I(() => n.complete ? n.completeMessage : n.progressMessage);
|
|
697
|
+
return (e, t) => (c(), l("p", je, [
|
|
698
|
+
b(_(a.label) + ": ", 1),
|
|
699
|
+
i("span", {
|
|
700
|
+
class: k([{ "beam--alert": !a.complete }, "beam--normal"])
|
|
701
|
+
}, _(r.value), 3)
|
|
702
|
+
]));
|
|
613
703
|
}
|
|
614
704
|
});
|
|
615
|
-
function
|
|
616
|
-
|
|
705
|
+
function Qe(a) {
|
|
706
|
+
a.component("ActionFooter", q), a.component("BeamMetadata", X), a.component("BeamModal", ee), a.component("BeamModalOutlet", te), a.component("Confirm", se), a.component("ItemCheck", V), a.component("ItemCount", E), a.component("ListAnchor", me), a.component("ListItem", w), a.component("ListView", ve), a.component("Navbar", ge), a.component("ScanInput", $e), a.component("SplitColumn", Pe), a.component("BeamHeading", Le), a.component("BeamArrow", Ne), a.component("BeamBtn", Oe), a.component("BeamProgress", He);
|
|
617
707
|
}
|
|
618
708
|
export {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
709
|
+
q as ActionFooter,
|
|
710
|
+
X as BeamMetadata,
|
|
711
|
+
ee as BeamModal,
|
|
712
|
+
te as BeamModalOutlet,
|
|
713
|
+
se as Confirm,
|
|
714
|
+
V as ItemCheck,
|
|
715
|
+
E as ItemCount,
|
|
716
|
+
me as ListAnchor,
|
|
717
|
+
w as ListItem,
|
|
718
|
+
ve as ListView,
|
|
719
|
+
ge as Navbar,
|
|
720
|
+
$e as ScanInput,
|
|
721
|
+
Qe as install
|
|
632
722
|
};
|
|
633
723
|
//# sourceMappingURL=beam.js.map
|