@stonecrop/beam 0.2.41 → 0.2.43

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