@yoobic/yobi 8.5.33 → 8.5.34
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/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-form-capture.cjs.entry.js +18 -4
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +4 -2
- package/dist/collection/components/form/form-capture/form-capture.js +53 -21
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +4 -2
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/yoo-form-capture.entry.js +18 -4
- package/dist/design-system/yoo-form-dynamic.entry.js +4 -2
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-form-capture.entry.js +18 -4
- package/dist/esm/yoo-form-dynamic.entry.js +4 -2
- package/dist/types/components/form/form-capture/form-capture.d.ts +4 -1
- package/dist/types/components.d.ts +4 -2
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/form-field/form-field.interface.d.ts +2 -1
- package/dist/types/interfaces/form-field/form-field.instance.d.ts +0 -1
- package/package.json +1 -1
@@ -58,6 +58,7 @@ const YooFormCaptureComponent = class {
|
|
58
58
|
this.max = 1;
|
59
59
|
this.allowCamera = true;
|
60
60
|
this.validators = [];
|
61
|
+
this.useStitching = false;
|
61
62
|
this.isProcessingPhoto = true;
|
62
63
|
this.isSelectorMode = false;
|
63
64
|
this.selectedIndex = [];
|
@@ -245,6 +246,9 @@ const YooFormCaptureComponent = class {
|
|
245
246
|
if (this.extraData.imageRecognitionResults) {
|
246
247
|
this.imageRecognitionResults = this.extraData.imageRecognitionResults;
|
247
248
|
}
|
249
|
+
if (this.extraData.useStitching) {
|
250
|
+
this.useStitching = this.extraData.useStitching;
|
251
|
+
}
|
248
252
|
}
|
249
253
|
this.initTags();
|
250
254
|
}
|
@@ -426,7 +430,7 @@ const YooFormCaptureComponent = class {
|
|
426
430
|
// Lenovo bug with taking photo, use media capture plugin or low pref cam instead
|
427
431
|
const useMediaCapture = isLenovo() && !useLowPerfCamera && !useLibrary && mediaType === MediaType.PICTURE;
|
428
432
|
let promise;
|
429
|
-
if (this.algorithm && this.
|
433
|
+
if (this.algorithm && this.useStitching && !useLibrary) {
|
430
434
|
let stitchDirection = null;
|
431
435
|
const buttons = [
|
432
436
|
{ text: translate('TOPTOBOTTOM'), icon: 'big-arrow-down', handler: () => {
|
@@ -1351,9 +1355,19 @@ const YooFormCaptureComponent = class {
|
|
1351
1355
|
return (h("div", { class: "readonly-container" }, this.type === 'audio' ? this.renderAudio(this.value) : this.renderPreview(), this.extraData && this.extraData.distance && this.renderDistance(), this.hasExtraData() && !this.isHistory && this.renderEditIcon()));
|
1352
1356
|
}
|
1353
1357
|
else {
|
1354
|
-
return (h("div", { class: "single" }, this.renderCameraContainer(this.value), this.isImageRecognition &&
|
1358
|
+
return (h("div", { class: "single" }, this.renderCameraContainer(this.value), this.isImageRecognition && this.renderButtonContainer()));
|
1355
1359
|
}
|
1356
1360
|
}
|
1361
|
+
toggleStitching(ev) {
|
1362
|
+
ev === null || ev === void 0 ? void 0 : ev.stopPropagation();
|
1363
|
+
this.useStitching = !this.useStitching;
|
1364
|
+
this.extraData.useStitching = this.useStitching;
|
1365
|
+
this.extraDataChanged.emit(this.extraData);
|
1366
|
+
}
|
1367
|
+
renderStitchingToggle() {
|
1368
|
+
var _a;
|
1369
|
+
return (this.isImageRecognition && this.allowStitching && (h("div", { class: { 'capture-status': true, 'image-reco': this.isImageRecognition } }, h("div", { class: "status-counters" }, translate('YOOBICUSESTITCHING')), h("div", null, h("yoo-form-toggle", { class: "app-color", size: "medium", readonly: ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) > 0, value: this.useStitching, onInputChanged: (ev) => { this.toggleStitching(ev); } })))));
|
1370
|
+
}
|
1357
1371
|
renderCaptureStatus() {
|
1358
1372
|
const value = this.value || [];
|
1359
1373
|
return (value && (h("div", { class: { 'capture-status': true, 'image-reco': this.isImageRecognition } }, this.required && (h("div", { class: "status" }, value.length > this.min
|
@@ -1455,11 +1469,11 @@ const YooFormCaptureComponent = class {
|
|
1455
1469
|
}
|
1456
1470
|
renderMultipleInNormalMode() {
|
1457
1471
|
const value = this.value || [];
|
1458
|
-
return (h("div", { class: "multiple" }, this.showImageLoader ? h("yoo-loader", { class: "absolute backdrop", size: "large" }) : null, this.renderCaptureStatus(), h("div", { class: { 'camera-containers': true, 'no-padding': this.hideOptional } }, this.renderAddCameraContainer(), isArray(value) &&
|
1472
|
+
return (h("div", { class: "multiple" }, this.showImageLoader ? h("yoo-loader", { class: "absolute backdrop", size: "large" }) : null, this.renderStitchingToggle(), this.renderCaptureStatus(), h("div", { class: { 'camera-containers': true, 'no-padding': this.hideOptional } }, this.renderAddCameraContainer(), isArray(value) &&
|
1459
1473
|
value.length > 0 &&
|
1460
1474
|
value.map((item, index) => {
|
1461
1475
|
return this.renderCameraContainer(item, index);
|
1462
|
-
})), this.isImageRecognition
|
1476
|
+
})), this.isImageRecognition ? this.renderButtonContainer() : null));
|
1463
1477
|
}
|
1464
1478
|
renderAddCameraContainer(index = -1) {
|
1465
1479
|
return (h("div", { class: "camera-container", ref: (el) => (this.cameraContainerElement = el), onClick: (ev) => this.onShowActionSheet(null, index, ev) }, h("input", { name: "file", multiple: true, class: "add-input", type: "file", onChange: () => this.onAddFileSelect(), accept: this.getAcceptExtension() }), h("yoo-icon", { size: this.iconSize, name: this.getIcon(), color: this.disabled ? 'light' : 'app-color' })));
|
@@ -1642,7 +1642,8 @@ const YooFormDynamicComponent = class {
|
|
1642
1642
|
tags: data[field.name].tags,
|
1643
1643
|
_geoloc: data[field.name]._geoloc,
|
1644
1644
|
imageRecognitionResults: data[field.name].imageRecognitionResults,
|
1645
|
-
priceRecognitionResults: data[field.name].priceRecognitionResults
|
1645
|
+
priceRecognitionResults: data[field.name].priceRecognitionResults,
|
1646
|
+
useStitching: data[field.name].useStitching
|
1646
1647
|
};
|
1647
1648
|
}
|
1648
1649
|
}
|
@@ -4003,9 +4004,10 @@ const YooFormDynamicComponent = class {
|
|
4003
4004
|
allowCamera: field.allowCamera,
|
4004
4005
|
allowUserImages: field.allowUserImages,
|
4005
4006
|
isImageRecognition: field.isImageRecognition,
|
4007
|
+
allowStitching: field.allowStitching,
|
4008
|
+
useStitching: field.useStitching,
|
4006
4009
|
algorithm: field.imageRecognitionAlgorithm,
|
4007
4010
|
algorithmDisplay: field.imageRecognitionDisplay,
|
4008
|
-
isBackgroundProcess: field.isBackgroundProcess,
|
4009
4011
|
label: generateLabel(field),
|
4010
4012
|
multiple: field.type === FormFieldType.multiphotos,
|
4011
4013
|
min: field.minPhotos || 1,
|
@@ -29,10 +29,10 @@ export declare class YooFormCaptureComponent implements IFormCapture {
|
|
29
29
|
allowAnnotate: boolean;
|
30
30
|
allowCamera: boolean;
|
31
31
|
isImageRecognition: boolean;
|
32
|
+
allowStitching: boolean;
|
32
33
|
algorithm: IAlgorithm;
|
33
34
|
algorithmDisplay: IImageRecognitionDisplay[];
|
34
35
|
isAnimationFinished: boolean;
|
35
|
-
isBackgroundProcess: boolean;
|
36
36
|
label: string;
|
37
37
|
isPdf?: boolean;
|
38
38
|
name: string;
|
@@ -58,6 +58,7 @@ export declare class YooFormCaptureComponent implements IFormCapture {
|
|
58
58
|
value: string | string[];
|
59
59
|
validators: (Validator<string> | IValidatorEntry)[];
|
60
60
|
allowURLInput?: boolean;
|
61
|
+
useStitching: boolean;
|
61
62
|
validityChanged: EventEmitter<boolean>;
|
62
63
|
inputBlurred: EventEmitter<any>;
|
63
64
|
inputFocused: EventEmitter<any>;
|
@@ -199,6 +200,8 @@ export declare class YooFormCaptureComponent implements IFormCapture {
|
|
199
200
|
onShowDistanceDialog(index?: number): void;
|
200
201
|
renderDistance(index?: number): any[];
|
201
202
|
renderSingle(): any;
|
203
|
+
toggleStitching(ev: CustomEvent<boolean>): void;
|
204
|
+
renderStitchingToggle(): any;
|
202
205
|
renderCaptureStatus(): any;
|
203
206
|
renderMultiple(): any;
|
204
207
|
checkImageOverflow(): boolean;
|
@@ -1972,6 +1972,7 @@ export namespace Components {
|
|
1972
1972
|
"allowCamera": boolean;
|
1973
1973
|
"allowGif": boolean;
|
1974
1974
|
"allowLibrary": boolean;
|
1975
|
+
"allowStitching": boolean;
|
1975
1976
|
"allowURLInput"?: boolean;
|
1976
1977
|
"allowUnsplash": boolean;
|
1977
1978
|
"allowUserImages": boolean;
|
@@ -1992,7 +1993,6 @@ export namespace Components {
|
|
1992
1993
|
"hideOptional"?: boolean;
|
1993
1994
|
"imageRecognitionKpiKeys": { name: string; hideMobile: boolean }[];
|
1994
1995
|
"isAnimationFinished": boolean;
|
1995
|
-
"isBackgroundProcess": boolean;
|
1996
1996
|
"isHistory": boolean;
|
1997
1997
|
"isImageRecognition": boolean;
|
1998
1998
|
"isPdf"?: boolean;
|
@@ -2027,6 +2027,7 @@ export namespace Components {
|
|
2027
2027
|
"updateAutocompleteValues": (tags: any) => Promise<void>;
|
2028
2028
|
"updateData": (value: any, extraData: any) => Promise<void>;
|
2029
2029
|
"useGallery": boolean;
|
2030
|
+
"useStitching": boolean;
|
2030
2031
|
"validators": (Validator<string> | IValidatorEntry)[];
|
2031
2032
|
"value": string | string[];
|
2032
2033
|
}
|
@@ -12809,6 +12810,7 @@ declare namespace LocalJSX {
|
|
12809
12810
|
"allowCamera"?: boolean;
|
12810
12811
|
"allowGif"?: boolean;
|
12811
12812
|
"allowLibrary"?: boolean;
|
12813
|
+
"allowStitching"?: boolean;
|
12812
12814
|
"allowURLInput"?: boolean;
|
12813
12815
|
"allowUnsplash"?: boolean;
|
12814
12816
|
"allowUserImages"?: boolean;
|
@@ -12829,7 +12831,6 @@ declare namespace LocalJSX {
|
|
12829
12831
|
"hideOptional"?: boolean;
|
12830
12832
|
"imageRecognitionKpiKeys"?: { name: string; hideMobile: boolean }[];
|
12831
12833
|
"isAnimationFinished"?: boolean;
|
12832
|
-
"isBackgroundProcess"?: boolean;
|
12833
12834
|
"isHistory"?: boolean;
|
12834
12835
|
"isImageRecognition"?: boolean;
|
12835
12836
|
"isPdf"?: boolean;
|
@@ -12863,6 +12864,7 @@ declare namespace LocalJSX {
|
|
12863
12864
|
"tags"?: string[];
|
12864
12865
|
"type"?: 'video' | 'audio' | 'photo';
|
12865
12866
|
"useGallery"?: boolean;
|
12867
|
+
"useStitching"?: boolean;
|
12866
12868
|
"validators"?: (Validator<string> | IValidatorEntry)[];
|
12867
12869
|
"value"?: string | string[];
|
12868
12870
|
}
|
@@ -254,10 +254,11 @@ export interface IFormField {
|
|
254
254
|
hideMobile?: boolean;
|
255
255
|
hideFromPhotoLibrary?: boolean;
|
256
256
|
isImageRecognition?: boolean;
|
257
|
+
allowStitching?: boolean;
|
258
|
+
useStitching?: boolean;
|
257
259
|
imageRecognitionAlgorithm?: IAlgorithm;
|
258
260
|
imageRecognitionKpiFiles?: any;
|
259
261
|
imageRecognitionDisplay?: IImageRecognitionDisplay[];
|
260
|
-
isBackgroundProcess?: boolean;
|
261
262
|
dontSaveIfHidden?: boolean;
|
262
263
|
color?: TColor;
|
263
264
|
size?: number;
|
@@ -61,7 +61,6 @@ export interface IFormCapture extends IFormInputBase<string[] | string> {
|
|
61
61
|
allowGif: boolean;
|
62
62
|
allowAnnotate: boolean;
|
63
63
|
isImageRecognition: boolean;
|
64
|
-
isBackgroundProcess: boolean;
|
65
64
|
detailView?: boolean;
|
66
65
|
detailViewOptions?: IFormCaptureDetailViewOptions;
|
67
66
|
algorithm?: IAlgorithm;
|