@unissey-web/web-components 3.10.0-rc.1 → 3.10.0-rc.2

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.
@@ -3,7 +3,7 @@ import { selfieCaptureStrings } from './selfie-capture.js';
3
3
  import { referenceCaptureStrings } from './reference-capture.js';
4
4
  import './button.js';
5
5
  import './en-e76ed5a0.js';
6
- import './video-recorder-024f6f4c.js';
6
+ import './video-recorder-365eb46f.js';
7
7
  import './variables-09a3e162.js';
8
8
  import './video-record-directions.js';
9
9
  import './direction-card-f55e1936.js';
@@ -40,7 +40,8 @@ var FullCapture = /*#__PURE__*/function (_LitElement) {
40
40
  detail: {
41
41
  selfie: e.detail.media,
42
42
  reference: this.reference,
43
- metadata: e.detail.metadata
43
+ metadata: e.detail.metadata,
44
+ error: e.detail.error
44
45
  }
45
46
  }));
46
47
  }
@@ -65,7 +66,7 @@ var FullCapture = /*#__PURE__*/function (_LitElement) {
65
66
  key: "renderReferenceStep",
66
67
  value: function renderReferenceStep() {
67
68
  var _this$strings$referen, _this$strings$referen2, _this$strings$referen3;
68
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral([" <uni-reference-capture\n @reference=\"", "\"\n @recorderReady=\"", "\"\n recorder-options=\"", "\"\n strings=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <slot name=\"reference-directions\" slot=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n\n <slot name=\"action-btn\" slot=\"action-btn\"></slot>\n </uni-reference-capture>"])), this.handleReference, this.handleRecoderReady, JSON.stringify(this.recorderOptions), JSON.stringify((_this$strings$referen = this.strings.reference) !== null && _this$strings$referen !== void 0 ? _this$strings$referen : referenceCaptureStrings), this.hideReferenceCaptureBtn, this.disableDebugMode, JSON.stringify((_this$strings$referen2 = (_this$strings$referen3 = this.strings.reference) === null || _this$strings$referen3 === void 0 ? void 0 : _this$strings$referen3.directions) !== null && _this$strings$referen2 !== void 0 ? _this$strings$referen2 : referenceCaptureStrings.directions));
69
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral([" <uni-reference-capture\n @reference=\"", "\"\n @recorderReady=\"", "\"\n recorder-options=\"", "\"\n strings=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <slot name=\"reference-directions\" slot=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n\n <slot name=\"reference-action-button\" slot=\"action-button\"></slot>\n </uni-reference-capture>"])), this.handleReference, this.handleRecoderReady, JSON.stringify(this.recorderOptions), JSON.stringify((_this$strings$referen = this.strings.reference) !== null && _this$strings$referen !== void 0 ? _this$strings$referen : referenceCaptureStrings), this.hideReferenceCaptureBtn, this.disableDebugMode, JSON.stringify((_this$strings$referen2 = (_this$strings$referen3 = this.strings.reference) === null || _this$strings$referen3 === void 0 ? void 0 : _this$strings$referen3.directions) !== null && _this$strings$referen2 !== void 0 ? _this$strings$referen2 : referenceCaptureStrings.directions));
69
70
  }
70
71
  }, {
71
72
  key: "renderSelfieStep",
package/dist/index.d.ts CHANGED
@@ -697,6 +697,7 @@ declare class SelfieCapture extends LitElement {
697
697
  handleRecordCompleted(e: CustomEvent<{
698
698
  media: Blob;
699
699
  metadata: unknown;
700
+ error?: string;
700
701
  }>): void;
701
702
  handleRecordStarting(e: CustomEvent): void;
702
703
  handleRecordCapturing(e: CustomEvent): void;
@@ -866,6 +867,7 @@ declare class ReferenceCapture extends LitElement {
866
867
  handleRecordCompleted(e: CustomEvent<{
867
868
  media: Blob;
868
869
  metadata: unknown;
870
+ error?: string;
869
871
  }>): void;
870
872
  handleRecordStarting(e: CustomEvent): void;
871
873
  handleRecordCapturing(e: CustomEvent): void;
@@ -1041,6 +1043,7 @@ declare class FullCapture extends LitElement {
1041
1043
  handleSelfie(e: CustomEvent<{
1042
1044
  media: Blob;
1043
1045
  metadata: unknown;
1046
+ error?: string;
1044
1047
  }>): void;
1045
1048
  handleRecoderReady(e: CustomEvent<{
1046
1049
  recorderElmt: HTMLElement;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Button } from './button.js';
2
- import { R as Recorder } from './video-recorder-024f6f4c.js';
3
- export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-024f6f4c.js';
2
+ import { R as Recorder } from './video-recorder-365eb46f.js';
3
+ export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-365eb46f.js';
4
4
  export { VideoRecordDirections } from './video-record-directions.js';
5
5
  export { PictureRecorder } from './picture-recorder.js';
6
6
  export { PictureEditor } from './picture-editor.js';
@@ -1,6 +1,6 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-ac3d3a27.js';
2
2
  import { E as EN } from './en-e76ed5a0.js';
3
- import { R as Recorder, b as buildPacked } from './video-recorder-024f6f4c.js';
3
+ import { R as Recorder, b as buildPacked } from './video-recorder-365eb46f.js';
4
4
  import './variables-09a3e162.js';
5
5
  import './button.js';
6
6
 
@@ -3,7 +3,7 @@ import './button.js';
3
3
  import './image-capture-directions.js';
4
4
  import './file-upload.js';
5
5
  import './picture-recorder.js';
6
- import { b as buildPacked } from './video-recorder-024f6f4c.js';
6
+ import { b as buildPacked } from './video-recorder-365eb46f.js';
7
7
  import { E as EN } from './en-e76ed5a0.js';
8
8
  import { c as referenceCaptureVars } from './variables-09a3e162.js';
9
9
  import './direction-card-f55e1936.js';
@@ -227,7 +227,7 @@ var ReferenceCapture = /*#__PURE__*/function (_LitElement) {
227
227
  key: "renderDirections",
228
228
  value: function renderDirections() {
229
229
  var _this$strings$title, _this$strings$directi, _this$strings$directi2, _this$strings$uploadB, _this$strings$picture, _this$strings$recordV;
230
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\"\n >", "</span\n >\n\n <div class=\"directions v-space\">\n <slot name=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n </div>\n\n <div class=\"h-box v-space\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\"><uni-upload-icon></uni-upload-icon></div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-photo-camera-icon></uni-photo-camera-icon>\n </div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-camera-video-outlined-icon></uni-camera-video-outlined-icon>\n </div>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : referenceCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : referenceCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : referenceCaptureStrings.directions), this.displayUploadStep, (_this$strings$uploadB = this.strings.uploadBtn) !== null && _this$strings$uploadB !== void 0 ? _this$strings$uploadB : referenceCaptureStrings.uploadBtn, this.displayPictureRecordStep, (_this$strings$picture = this.strings.pictureBtn) !== null && _this$strings$picture !== void 0 ? _this$strings$picture : referenceCaptureStrings.pictureBtn, this.displayVideoRecordStep, (_this$strings$recordV = this.strings.recordVidBtn) !== null && _this$strings$recordV !== void 0 ? _this$strings$recordV : referenceCaptureStrings.recordVidBtn);
230
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\">", "</span>\n\n <div class=\"directions v-space\">\n <slot name=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n </div>\n\n <div class=\"h-box v-space\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\"><uni-upload-icon></uni-upload-icon></div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-photo-camera-icon></uni-photo-camera-icon>\n </div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-camera-video-outlined-icon></uni-camera-video-outlined-icon>\n </div>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : referenceCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : referenceCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : referenceCaptureStrings.directions), this.displayUploadStep, (_this$strings$uploadB = this.strings.uploadBtn) !== null && _this$strings$uploadB !== void 0 ? _this$strings$uploadB : referenceCaptureStrings.uploadBtn, this.displayPictureRecordStep, (_this$strings$picture = this.strings.pictureBtn) !== null && _this$strings$picture !== void 0 ? _this$strings$picture : referenceCaptureStrings.pictureBtn, this.displayVideoRecordStep, (_this$strings$recordV = this.strings.recordVidBtn) !== null && _this$strings$recordV !== void 0 ? _this$strings$recordV : referenceCaptureStrings.recordVidBtn);
231
231
  }
232
232
  }, {
233
233
  key: "renderFileUpload",
@@ -251,7 +251,7 @@ var ReferenceCapture = /*#__PURE__*/function (_LitElement) {
251
251
  key: "renderVideoRecord",
252
252
  value: function renderVideoRecord() {
253
253
  var _this$strings$title3, _this$strings$videoRe, _this$strings$videoRe2, _this$recorderOptions2, _this$strings$back3;
254
- return x(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\"\n >", "</span\n >\n\n <div class=\"recorder v-space\">\n <uni-video-recorder\n id=\"uni-video-recorder\"\n strings=\"", "\"\n preset=\"", "\"\n log-level=\"", "\"\n face-checker=\"disabled\"\n @record=\"", "\"\n @recorderReady=\"", "\"\n @recordCompleted=\"", "\"\n @recordStarting=\"", "\"\n @recordCapturing=\"", "\"\n @recordInterrupted=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <div slot=\"left\">\n <uni-button variant=\"outlined\" @click=\"", "\">\n <uni-back-arrow-icon slot=\"icon\"></uni-back-arrow-icon>\n ", "\n </uni-button>\n </div>\n </uni-video-recorder>\n </div>\n </div>\n "])), (_this$strings$title3 = this.strings.title) !== null && _this$strings$title3 !== void 0 ? _this$strings$title3 : referenceCaptureStrings.title, (_this$strings$videoRe = this.strings.videoRecordSubtitle) !== null && _this$strings$videoRe !== void 0 ? _this$strings$videoRe : referenceCaptureStrings.videoRecordSubtitle, JSON.stringify((_this$strings$videoRe2 = this.strings.videoRecorder) !== null && _this$strings$videoRe2 !== void 0 ? _this$strings$videoRe2 : referenceCaptureStrings.videoRecorder), buildPacked.exports.AcquisitionPreset.DOC_VIDEO, (_this$recorderOptions2 = this.recorderOptions) === null || _this$recorderOptions2 === void 0 ? void 0 : _this$recorderOptions2.logLevel, this.handleVideoRecord, this.handleVideoRecoderReady, this.handleRecordCompleted, this.handleRecordStarting, this.handleRecordCapturing, this.handleRecordInterrupted, this.hideCaptureBtn, this.disableDebugMode, this.displayDirectionsStep, (_this$strings$back3 = this.strings.back) !== null && _this$strings$back3 !== void 0 ? _this$strings$back3 : referenceCaptureStrings.back);
254
+ return x(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\">", "</span>\n\n <div class=\"recorder v-space\">\n <uni-video-recorder\n id=\"uni-video-recorder\"\n strings=\"", "\"\n preset=\"", "\"\n log-level=\"", "\"\n face-checker=\"disabled\"\n @record=\"", "\"\n @recorderReady=\"", "\"\n @recordCompleted=\"", "\"\n @recordStarting=\"", "\"\n @recordCapturing=\"", "\"\n @recordInterrupted=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <div slot=\"left\">\n <uni-button variant=\"outlined\" @click=\"", "\">\n <uni-back-arrow-icon slot=\"icon\"></uni-back-arrow-icon>\n ", "\n </uni-button>\n </div>\n </uni-video-recorder>\n </div>\n </div>\n "])), (_this$strings$title3 = this.strings.title) !== null && _this$strings$title3 !== void 0 ? _this$strings$title3 : referenceCaptureStrings.title, (_this$strings$videoRe = this.strings.videoRecordSubtitle) !== null && _this$strings$videoRe !== void 0 ? _this$strings$videoRe : referenceCaptureStrings.videoRecordSubtitle, JSON.stringify((_this$strings$videoRe2 = this.strings.videoRecorder) !== null && _this$strings$videoRe2 !== void 0 ? _this$strings$videoRe2 : referenceCaptureStrings.videoRecorder), buildPacked.exports.AcquisitionPreset.DOC_VIDEO, (_this$recorderOptions2 = this.recorderOptions) === null || _this$recorderOptions2 === void 0 ? void 0 : _this$recorderOptions2.logLevel, this.handleVideoRecord, this.handleVideoRecoderReady, this.handleRecordCompleted, this.handleRecordStarting, this.handleRecordCapturing, this.handleRecordInterrupted, this.hideCaptureBtn, this.disableDebugMode, this.displayDirectionsStep, (_this$strings$back3 = this.strings.back) !== null && _this$strings$back3 !== void 0 ? _this$strings$back3 : referenceCaptureStrings.back);
255
255
  }
256
256
  }, {
257
257
  key: "renderVideoReplay",
@@ -1,6 +1,6 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i } from './lit-element-ac3d3a27.js';
2
2
  import { E as EN } from './en-e76ed5a0.js';
3
- import { b as buildPacked } from './video-recorder-024f6f4c.js';
3
+ import { b as buildPacked } from './video-recorder-365eb46f.js';
4
4
  import './video-record-directions.js';
5
5
  import './button.js';
6
6
  import { s as selfieCaptureVars } from './variables-09a3e162.js';
@@ -97,7 +97,7 @@ var SelfieCapture = /*#__PURE__*/function (_LitElement) {
97
97
  key: "renderDirections",
98
98
  value: function renderDirections() {
99
99
  var _this$strings$title, _this$strings$directi, _this$strings$directi2, _this$strings$recordB;
100
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\"\n >", "</span\n >\n\n <div class=\"v-space\"></div>\n\n <div class=\"directions\">\n <slot name=\"directions\">\n <uni-video-record-directions\n strings=\"", "\"\n >\n </uni-video-record-directions>\n </slot>\n </div>\n\n <div class=\"v-space\"></div>\n\n <div class=\"h-box\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <uni-camera-video-outlined-icon slot=\"icon\"></uni-camera-video-outlined-icon>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : selfieCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : selfieCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : selfieCaptureStrings.directions), this.handleRecordStart, (_this$strings$recordB = this.strings.recordBtnLabel) !== null && _this$strings$recordB !== void 0 ? _this$strings$recordB : selfieCaptureStrings.recordBtnLabel);
100
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\">", "</span>\n\n <div class=\"v-space\"></div>\n\n <div class=\"directions\">\n <slot name=\"directions\">\n <uni-video-record-directions\n strings=\"", "\"\n >\n </uni-video-record-directions>\n </slot>\n </div>\n\n <div class=\"v-space\"></div>\n\n <div class=\"h-box\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <uni-camera-video-outlined-icon slot=\"icon\"></uni-camera-video-outlined-icon>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : selfieCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : selfieCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : selfieCaptureStrings.directions), this.handleRecordStart, (_this$strings$recordB = this.strings.recordBtnLabel) !== null && _this$strings$recordB !== void 0 ? _this$strings$recordB : selfieCaptureStrings.recordBtnLabel);
101
101
  }
102
102
  }, {
103
103
  key: "renderRecorder",
@@ -4,7 +4,7 @@ import { E as EN } from './en-e76ed5a0.js';
4
4
  import './button.js';
5
5
 
6
6
  var name = "@unissey-web/web-components";
7
- var version = "3.10.0-rc.1";
7
+ var version = "3.10.0-rc.2";
8
8
  var description = "";
9
9
  var module = "./dist/index.js";
10
10
  var typings = "./dist/index.d.ts";
@@ -588,15 +588,11 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
588
588
  metadata = _yield$this$session$c.metadata;
589
589
  error = _yield$this$session$c.error;
590
590
  this.resetHints();
591
- if (!error) {
592
- _context3.next = 19;
593
- break;
594
- }
595
- return _context3.abrupt("return");
596
- case 19:
591
+ if (error) console.log(error);
597
592
  detail = {};
598
593
  detail[this.resultEvent.mediaPropertyName] = media;
599
594
  if (this.resultEvent.includeMetadata) detail["metadata"] = metadata;
595
+ if (error) detail["error"] = error;
600
596
  recordCompletedEvent = new CustomEvent("recordCompleted", {
601
597
  detail: detail
602
598
  });
@@ -1,5 +1,5 @@
1
1
  import './lit-element-ac3d3a27.js';
2
- export { R as Recorder, V as VideoRecorder } from './video-recorder-024f6f4c.js';
2
+ export { R as Recorder, V as VideoRecorder } from './video-recorder-365eb46f.js';
3
3
  import './button.js';
4
4
  import './en-e76ed5a0.js';
5
5
  import './variables-09a3e162.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unissey-web/web-components",
3
- "version": "3.10.0-rc.1",
3
+ "version": "3.10.0-rc.2",
4
4
  "description": "",
5
5
  "module": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",