@things-factory/barcode-ui 4.3.116-alpha.0 → 4.3.122

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.
@@ -29,6 +29,10 @@ export class BarcodeScanableInput extends LitElement {
29
29
  attribute: 'without-enter',
30
30
  type: Boolean
31
31
  },
32
+ scanOnly: {
33
+ attribute: 'scan-only',
34
+ type: Boolean
35
+ },
32
36
  value: String
33
37
  }
34
38
  }
@@ -109,7 +113,7 @@ export class BarcodeScanableInput extends LitElement {
109
113
  this.style.setProperty('--barcodescan-input-button-icon', `url(${barcodeIcon})`)
110
114
 
111
115
  return html`
112
- <input type="search" .value=${this.value || ''} maxlength="50" />
116
+ <input type="search" .value=${this.value || ''} ?disabled=${this.scanOnly && this.scannable} maxlength="50" />
113
117
  <button
114
118
  ?hidden=${!this.scannable}
115
119
  id="scan-button"
@@ -149,7 +153,7 @@ export class BarcodeScanableInput extends LitElement {
149
153
  var result = await this.reader.decodeOnceFromStream(this.stream, template.video)
150
154
 
151
155
  this.input.value = result
152
- if (!this.withoutEnter) {
156
+ if (!this.withoutEnter || this.scanOnly) {
153
157
  this.dispatchEvent(new KeyboardEvent('keypress', { keyCode: 0x0d }))
154
158
  }
155
159
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/barcode-ui",
3
- "version": "4.3.116-alpha.0",
3
+ "version": "4.3.122",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@operato/layout": "^0.4.6",
28
- "@things-factory/shell": "^4.3.116-alpha.0",
28
+ "@things-factory/shell": "^4.3.122",
29
29
  "bwip-js": "^2.0.11"
30
30
  },
31
- "gitHead": "6c1d3672207e6cc44c562244dc41aa371c48184a"
31
+ "gitHead": "3edd80e6ca68480b22ee0e25eba34d13ab0e49f1"
32
32
  }