@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 CHANGED
@@ -1,116 +1,116 @@
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({
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(r, { emit: o }) {
6
- const s = o, e = () => {
7
- s("click");
5
+ setup(a, { emit: n }) {
6
+ const r = n, e = () => {
7
+ r("click");
8
8
  };
9
- return (t, a) => (c(), u("footer", H, [
10
- i("span", Q, [
9
+ return (t, s) => (c(), l("footer", Q, [
10
+ i("span", R, [
11
11
  i("button", {
12
- class: "footer-action btn",
12
+ class: "beam_btn",
13
13
  onClick: e
14
14
  }, [
15
- _(t.$slots, "default")
15
+ m(t.$slots, "default")
16
16
  ])
17
17
  ])
18
18
  ]));
19
19
  }
20
- }), q = { class: "beam_metadata" }, G = { class: "beam_metadata_content" }, W = { class: "beam_metadata_block" }, Y = { class: "beam_metadata_heading" }, J = /* @__PURE__ */ d({
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(r) {
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: ")),
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: !o.order.complete }, "beam_metadata--normal"])
35
- }, p(o.order.complete ? "Complete" : "In Progress"), 3)
34
+ class: k([{ alert: !n.order.complete }, "beam_metadata--normal"])
35
+ }, _(n.order.complete ? "Complete" : "In Progress"), 3)
36
36
  ])
37
37
  ]),
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))
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
- }), X = { class: "beam__modal" }, Z = /* @__PURE__ */ d({
43
+ }), Z = { class: "beam_modal" }, ee = /* @__PURE__ */ u({
44
44
  __name: "BeamModal",
45
45
  props: {
46
46
  showModal: { type: Boolean }
47
47
  },
48
- setup(r) {
49
- return (o, s) => {
50
- const e = T("portal");
51
- return c(), v(e, { to: "beam__modal_outlet" }, {
52
- default: P(() => [
53
- $(i("div", X, [
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: "btn",
56
- onClick: s[0] || (s[0] = (t) => o.$emit("closemodal"))
55
+ class: "beam_btn",
56
+ onClick: r[0] || (r[0] = (t) => n.$emit("closemodal"))
57
57
  }, "Close Modal"),
58
- _(o.$slots, "default", {
59
- onClosemodal: s[1] || (s[1] = (t) => o.$emit("closemodal")),
60
- onConfirmmodal: s[2] || (s[2] = (t) => o.$emit("confirmmodal"))
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
- [E, o.showModal]
63
+ [A, n.showModal]
64
64
  ])
65
65
  ]),
66
66
  _: 3
67
67
  });
68
68
  };
69
69
  }
70
- }), ee = /* @__PURE__ */ d({
70
+ }), te = /* @__PURE__ */ u({
71
71
  __name: "BeamModalOutlet",
72
72
  emits: ["confirmmodal", "closemodal"],
73
- setup(r) {
74
- return (o, s) => {
75
- const e = T("portal-target");
76
- return c(), v(e, { name: "beam__modal_outlet" });
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
- }), K = (r, o) => {
80
- const s = r.__vccOpts || r;
81
- for (const [e, t] of o)
82
- s[e] = t;
83
- return s;
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)),
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: "btn",
90
- onClick: o[0] || (o[0] = (s) => r.$emit("confirmmodal"))
89
+ class: "beam_btn",
90
+ onClick: n[0] || (n[0] = (r) => a.$emit("confirmmodal"))
91
91
  }, "Yes"),
92
92
  i("button", {
93
- class: "btn",
94
- onClick: o[1] || (o[1] = (s) => r.$emit("closemodal"))
93
+ class: "beam_btn",
94
+ onClick: n[1] || (n[1] = (r) => a.$emit("closemodal"))
95
95
  }, "No")
96
96
  ]);
97
97
  }
98
- const oe = /* @__PURE__ */ K(te, [["render", ae]]), se = { class: "container" }, re = /* @__PURE__ */ d({
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(r) {
106
- const o = D(r, "modelValue");
107
- return (s, e) => (c(), u("label", se, [
108
- $(i("input", {
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) => o.value = t),
110
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => n.value = t),
111
111
  tabindex: "-1"
112
112
  }, null, 512), [
113
- [F, o.value]
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
- }), L = /* @__PURE__ */ K(re, [["__scopeId", "data-v-f44a510e"]]), ie = { class: "beam__itemcount" }, ce = ["contenteditable"], le = { key: 0 }, I = /* @__PURE__ */ d({
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__ */ N({
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(r) {
133
- const o = D(r, "modelValue"), s = x(() => o.value === r.denominator), e = (t) => {
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 a = Number(t.target.innerHTML) || 0;
136
- o.value = Math.min(a, r.denominator);
135
+ const s = Number(t.target.innerHTML) || 0;
136
+ n.value = Math.min(s, a.denominator);
137
137
  };
138
- return (t, a) => (c(), u("div", ie, [
138
+ return (t, s) => (c(), l("div", ce, [
139
139
  i("span", {
140
140
  contenteditable: t.editable,
141
- class: k({ alert: !s.value }),
141
+ class: k({ "beam--alert": !r.value }),
142
142
  onInput: e,
143
143
  onClick: e
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)
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
- }), ue = ["href"], de = /* @__PURE__ */ d({
149
+ }), de = ["href"], me = /* @__PURE__ */ u({
150
150
  __name: "ListAnchor",
151
151
  props: {
152
152
  to: { default: "" }
153
153
  },
154
- setup(r) {
155
- return (o, s) => (c(), u("a", {
156
- href: o.to,
157
- class: "beam__listanchor"
154
+ setup(a) {
155
+ return (n, r) => (c(), l("a", {
156
+ href: n.to,
157
+ class: "beam_list-anchor"
158
158
  }, [
159
- _(o.$slots, "default")
160
- ], 8, ue));
159
+ m(n.$slots, "default")
160
+ ], 8, de));
161
161
  }
162
- }), me = {
162
+ }), fe = {
163
163
  tabindex: "0",
164
- class: "beam__listitem"
165
- }, fe = { class: "beam__listtext" }, b = /* @__PURE__ */ d({
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(r) {
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)
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
- o.value.count ? (c(), v(I, {
177
+ n.value.count ? (c(), h(E, {
178
178
  key: 0,
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,
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
- o.value.hasOwnProperty("checked") ? (c(), v(L, {
185
+ n.value.hasOwnProperty("checked") ? (c(), h(V, {
186
186
  key: 1,
187
- modelValue: o.value.checked,
188
- "onUpdate:modelValue": e[1] || (e[1] = (t) => o.value.checked = 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
- }), pe = { class: "beam__listview" }, _e = /* @__PURE__ */ d({
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(r, { emit: o }) {
199
- const s = o;
200
- S(() => {
198
+ setup(a, { emit: n }) {
199
+ const r = n;
200
+ K(() => {
201
201
  window.addEventListener("scroll", e);
202
- }), B(() => {
202
+ }), L(() => {
203
203
  window.removeEventListener("scroll", e);
204
204
  });
205
205
  const e = () => {
206
- const t = document.documentElement.scrollHeight - window.innerHeight, a = document.documentElement.scrollTop;
207
- t - a <= 2 && s("scrollbottom");
206
+ const t = document.documentElement.scrollHeight - window.innerHeight, s = document.documentElement.scrollTop;
207
+ t - s <= 2 && r("scrollbottom");
208
208
  };
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
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
- n.linkComponent ? (c(), v(U(n.linkComponent), {
213
+ o.linkComponent ? (c(), h(U(o.linkComponent), {
214
214
  key: 0,
215
- to: n.route,
215
+ to: o.route,
216
216
  tabindex: "-1"
217
217
  }, {
218
- default: P(() => [
219
- j(b, { item: n }, null, 8, ["item"])
218
+ default: T(() => [
219
+ M(w, { item: o }, null, 8, ["item"])
220
220
  ]),
221
221
  _: 2
222
- }, 1032, ["to"])) : (c(), v(b, {
222
+ }, 1032, ["to"])) : (c(), h(w, {
223
223
  key: 1,
224
- item: n
224
+ item: o
225
225
  }, null, 8, ["item"]))
226
226
  ]))), 128))
227
227
  ]));
228
228
  }
229
- }), ve = { class: "beam__navbar" }, he = { class: "navbar-action-wrapper" }, ye = /* @__PURE__ */ d({
229
+ }), be = { class: "beam_navbar" }, ge = /* @__PURE__ */ u({
230
230
  __name: "Navbar",
231
231
  emits: ["click"],
232
- setup(r, { emit: o }) {
233
- const s = o, e = () => {
234
- s("click");
232
+ setup(a, { emit: n }) {
233
+ const r = n, e = () => {
234
+ r("click");
235
235
  };
236
- return (t, a) => (c(), u("nav", ve, [
237
- _(t.$slots, "title", {}, () => [
238
- a[0] || (a[0] = i("h1", { class: "nav-title" }, "TITLE", -1))
239
- ]),
240
- i("div", he, [
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 btn",
248
+ class: "navbar-action beam_btn",
243
249
  onClick: e
244
250
  }, [
245
- _(t.$slots, "navbaraction", {}, () => [
246
- a[1] || (a[1] = w("Action"))
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 be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
254
- function ge(r) {
255
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
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 V = { exports: {} };
258
- (function(r, o) {
259
- (function(s, e) {
260
- r.exports = e();
261
- })(be, function() {
262
- var s = {
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 a = {
273
- onScan: function(n, l) {
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(n) {
282
+ onScanError: function(o) {
277
283
  },
278
284
  // Callback after detection of a unsuccessfull scanning (scanned string in parameter)
279
- onKeyProcess: function(n, l) {
285
+ onKeyProcess: function(o, d) {
280
286
  },
281
287
  // Callback after receiving and processing a char (scanned char in parameter)
282
- onKeyDetect: function(n, l) {
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(n, l) {
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(n) {
289
- return s.decodeKeyEvent(n);
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(a, t), e.scannerDetectionData = {
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 a = String.fromCharCode(t);
408
+ var s = String.fromCharCode(t);
403
409
  switch (e.shiftKey) {
404
410
  case !1:
405
- a = a.toLowerCase();
411
+ s = s.toLowerCase();
406
412
  break;
407
413
  case !0:
408
- a = a.toUpperCase();
414
+ s = s.toUpperCase();
409
415
  break;
410
416
  }
411
- return a;
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(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);
438
- document.dispatchEvent(l);
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 a = document.activeElement;
465
+ var s = document.activeElement;
460
466
  if (Array.isArray(t)) {
461
- for (var n = 0; n < t.length; n++)
462
- if (a.matches(t[n]) === !0)
467
+ for (var o = 0; o < t.length; o++)
468
+ if (s.matches(t[o]) === !0)
463
469
  return !0;
464
- } else if (a.matches(t))
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 a = e.scannerDetectionData, n = a.options, l = a.options.singleScanQty, f = a.vars.firstCharTime, g = a.vars.lastCharTime, m = {}, h;
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 < n.minLength:
479
- m = {
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 g - f > t.length * n.avgTimeByChar:
484
- m = {
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 n.onScan.call(e, t, l), h = new CustomEvent(
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: l
500
+ qty: d
495
501
  }
496
502
  }
497
- ), e.dispatchEvent(h), s._reinitialize(e), !0;
503
+ ), e.dispatchEvent(g), r._reinitialize(e), !0;
498
504
  }
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(
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: m }
502
- ), e.dispatchEvent(h), s._reinitialize(e), !1;
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 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;
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 = 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);
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 (n.firstCharTime && a.suffixKeyCodes.indexOf(t) !== -1):
541
- e.preventDefault(), e.stopImmediatePropagation(), l = !0;
546
+ case (o.firstCharTime && s.suffixKeyCodes.indexOf(t) !== -1):
547
+ e.preventDefault(), e.stopImmediatePropagation(), d = !0;
542
548
  break;
543
- case (!n.firstCharTime && a.prefixKeyCodes.indexOf(t) !== -1):
544
- e.preventDefault(), e.stopImmediatePropagation(), l = !1;
549
+ case (!o.firstCharTime && s.prefixKeyCodes.indexOf(t) !== -1):
550
+ e.preventDefault(), e.stopImmediatePropagation(), d = !1;
545
551
  break;
546
552
  default:
547
- var f = a.keyCodeMapper.call(this, e);
548
- if (f === null)
553
+ var p = s.keyCodeMapper.call(this, e);
554
+ if (p === null)
549
555
  return;
550
- n.accumulatedString += f, a.preventDefault && e.preventDefault(), a.stopPropagation && e.stopImmediatePropagation(), l = !1;
556
+ o.accumulatedString += p, s.preventDefault && e.preventDefault(), s.stopPropagation && e.stopImmediatePropagation(), d = !1;
551
557
  break;
552
558
  }
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);
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, 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));
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 (!s._isFocusOnIgnoredElement(this)) {
572
- var t = s._getNormalizedKeyNum(e);
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 s;
601
+ return r;
596
602
  });
597
- })(V);
598
- var Ce = V.exports;
599
- const C = /* @__PURE__ */ ge(Ce), we = { id: "scan_input" }, ke = /* @__PURE__ */ d({
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(r, { emit: o }) {
606
- const s = o, e = r;
607
- return S(() => {
608
- const t = C.attachTo(window, { onScan: e.scanHandler });
609
- s("scanInstance", t);
610
- }), B(() => {
611
- C.detachFrom(window);
612
- }), (t, a) => (c(), u("div", we));
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 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);
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
- 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
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