@yoobic/yobi 8.6.33 → 8.6.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/yoo-form-capture.cjs.entry.js +1 -1
- package/dist/cjs/yoo-photo-editor.cjs.entry.js +7 -6
- package/dist/collection/components/3.organisms/photo-editor/photo-editor.js +7 -6
- package/dist/collection/components/form/form-capture/form-capture.js +1 -1
- package/dist/design-system/yoo-form-capture.entry.js +1 -1
- package/dist/design-system/yoo-photo-editor.entry.js +7 -6
- package/dist/esm/yoo-form-capture.entry.js +1 -1
- package/dist/esm/yoo-photo-editor.entry.js +7 -6
- package/package.json +1 -1
@@ -1647,7 +1647,7 @@ const YooFormCaptureComponent = class {
|
|
1647
1647
|
annotations = annotations.filter((text) => (text === null || text === void 0 ? void 0 : text.type) !== 'dot');
|
1648
1648
|
}
|
1649
1649
|
return [
|
1650
|
-
index$1.h("div", { class: "image-container" }, index$1.h("yoo-photo-editor", { src: imageData.src,
|
1650
|
+
index$1.h("div", { class: "image-container" }, index$1.h("yoo-photo-editor", { src: imageData.src, display: "preview", zoomable: true, ...(this.isPdf && {
|
1651
1651
|
cloudinaryOptions
|
1652
1652
|
}), animated: extraData === null || extraData === void 0 ? void 0 : extraData.animated, drawings: imageData === null || imageData === void 0 ? void 0 : imageData.drawings, annotations: annotations, onImageClicked: (ev) => !this.isPdf && this.handleImageClick(index$2, ev) }), ((_b = this.detailViewOptions) === null || _b === void 0 ? void 0 : _b.showDetailInfoAsOverlay) && this.renderDetailViewOverlay(extraData)),
|
1653
1653
|
distance && this.renderDistance(index$2)
|
@@ -348,8 +348,8 @@ const YooPhotoEditorComponent = class {
|
|
348
348
|
return this.isDrawMode || this.isTextMode || this.isDotMode;
|
349
349
|
}
|
350
350
|
get isImageZoomable() {
|
351
|
-
var _a;
|
352
|
-
return ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && (this.zoomable
|
351
|
+
var _a, _b;
|
352
|
+
return this.isReadonly && ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && ((_b = this.zoomable) !== null && _b !== void 0 ? _b : !this.isPreview);
|
353
353
|
}
|
354
354
|
get isImageZoomed() {
|
355
355
|
return index$1.getTransformInfos(this.imageElement).scaleX > 1;
|
@@ -713,9 +713,9 @@ const YooPhotoEditorComponent = class {
|
|
713
713
|
var _a;
|
714
714
|
this.isTextEditMode && ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.blur());
|
715
715
|
}
|
716
|
-
toggleColorSelector() {
|
716
|
+
toggleColorSelector(forceShow) {
|
717
717
|
var _a, _b;
|
718
|
-
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', this.isEditMode && !this.hasDiscardBeenClicked);
|
718
|
+
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', forceShow !== null && forceShow !== void 0 ? forceShow : (this.isEditMode && !this.hasDiscardBeenClicked));
|
719
719
|
}
|
720
720
|
toggleSaveButton(forceShow) {
|
721
721
|
if (getActionButton().validate) {
|
@@ -1286,6 +1286,7 @@ const YooPhotoEditorComponent = class {
|
|
1286
1286
|
this.lastMode = this.mode;
|
1287
1287
|
this.hasDoneBeenClicked = true;
|
1288
1288
|
this.leaveColorPickerMode();
|
1289
|
+
this.toggleColorSelector(false);
|
1289
1290
|
if (this.isTextCreateMode) {
|
1290
1291
|
if ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.textContent) {
|
1291
1292
|
this.createTextBox();
|
@@ -1421,7 +1422,7 @@ const YooPhotoEditorComponent = class {
|
|
1421
1422
|
return index.h("canvas", { id: "src", onClick: (ev) => ev.preventDefault(), ref: el => this.canvasSrcElement = el, ...this.computedImageSize });
|
1422
1423
|
}
|
1423
1424
|
renderImage() {
|
1424
|
-
var _a, _b, _c, _d;
|
1425
|
+
var _a, _b, _c, _d, _e;
|
1425
1426
|
return (index.h("yoo-img", { instant: true, id: "src", src: this.finalSrc, ignoreHeight: true, ignoreWidth: true, disableAspectRatioCalc: true, allowCloudinary: false, ...((this.isPreview && !this.isImageZoomable) && {
|
1426
1427
|
cloudinaryOptions: {
|
1427
1428
|
width: (_b = (_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.resized) === null || _b === void 0 ? void 0 : _b.width,
|
@@ -1432,7 +1433,7 @@ const YooPhotoEditorComponent = class {
|
|
1432
1433
|
}), ref: el => this.imageElement = el, style: {
|
1433
1434
|
...this.computedImageSizeStyle,
|
1434
1435
|
...(this.isImageZoomable && {
|
1435
|
-
transform: `scale(${this.imageSize.scaleFactor})`
|
1436
|
+
transform: `scale(${(_e = this.imageSize) === null || _e === void 0 ? void 0 : _e.scaleFactor})`
|
1436
1437
|
})
|
1437
1438
|
} }));
|
1438
1439
|
}
|
@@ -165,8 +165,8 @@ export class YooPhotoEditorComponent {
|
|
165
165
|
return this.isDrawMode || this.isTextMode || this.isDotMode;
|
166
166
|
}
|
167
167
|
get isImageZoomable() {
|
168
|
-
var _a;
|
169
|
-
return ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && (this.zoomable
|
168
|
+
var _a, _b;
|
169
|
+
return this.isReadonly && ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && ((_b = this.zoomable) !== null && _b !== void 0 ? _b : !this.isPreview);
|
170
170
|
}
|
171
171
|
get isImageZoomed() {
|
172
172
|
return getTransformInfos(this.imageElement).scaleX > 1;
|
@@ -530,9 +530,9 @@ export class YooPhotoEditorComponent {
|
|
530
530
|
var _a;
|
531
531
|
this.isTextEditMode && ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.blur());
|
532
532
|
}
|
533
|
-
toggleColorSelector() {
|
533
|
+
toggleColorSelector(forceShow) {
|
534
534
|
var _a, _b;
|
535
|
-
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', this.isEditMode && !this.hasDiscardBeenClicked);
|
535
|
+
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', forceShow !== null && forceShow !== void 0 ? forceShow : (this.isEditMode && !this.hasDiscardBeenClicked));
|
536
536
|
}
|
537
537
|
toggleSaveButton(forceShow) {
|
538
538
|
if (getActionButton().validate) {
|
@@ -1103,6 +1103,7 @@ export class YooPhotoEditorComponent {
|
|
1103
1103
|
this.lastMode = this.mode;
|
1104
1104
|
this.hasDoneBeenClicked = true;
|
1105
1105
|
this.leaveColorPickerMode();
|
1106
|
+
this.toggleColorSelector(false);
|
1106
1107
|
if (this.isTextCreateMode) {
|
1107
1108
|
if ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.textContent) {
|
1108
1109
|
this.createTextBox();
|
@@ -1238,7 +1239,7 @@ export class YooPhotoEditorComponent {
|
|
1238
1239
|
return h("canvas", { id: "src", onClick: (ev) => ev.preventDefault(), ref: el => this.canvasSrcElement = el, ...this.computedImageSize });
|
1239
1240
|
}
|
1240
1241
|
renderImage() {
|
1241
|
-
var _a, _b, _c, _d;
|
1242
|
+
var _a, _b, _c, _d, _e;
|
1242
1243
|
return (h("yoo-img", { instant: true, id: "src", src: this.finalSrc, ignoreHeight: true, ignoreWidth: true, disableAspectRatioCalc: true, allowCloudinary: false, ...((this.isPreview && !this.isImageZoomable) && {
|
1243
1244
|
cloudinaryOptions: {
|
1244
1245
|
width: (_b = (_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.resized) === null || _b === void 0 ? void 0 : _b.width,
|
@@ -1249,7 +1250,7 @@ export class YooPhotoEditorComponent {
|
|
1249
1250
|
}), ref: el => this.imageElement = el, style: {
|
1250
1251
|
...this.computedImageSizeStyle,
|
1251
1252
|
...(this.isImageZoomable && {
|
1252
|
-
transform: `scale(${this.imageSize.scaleFactor})`
|
1253
|
+
transform: `scale(${(_e = this.imageSize) === null || _e === void 0 ? void 0 : _e.scaleFactor})`
|
1253
1254
|
})
|
1254
1255
|
} }));
|
1255
1256
|
}
|
@@ -1604,7 +1604,7 @@ export class YooFormCaptureComponent {
|
|
1604
1604
|
annotations = annotations.filter((text) => (text === null || text === void 0 ? void 0 : text.type) !== 'dot');
|
1605
1605
|
}
|
1606
1606
|
return [
|
1607
|
-
h("div", { class: "image-container" }, h("yoo-photo-editor", { src: imageData.src,
|
1607
|
+
h("div", { class: "image-container" }, h("yoo-photo-editor", { src: imageData.src, display: "preview", zoomable: true, ...(this.isPdf && {
|
1608
1608
|
cloudinaryOptions
|
1609
1609
|
}), animated: extraData === null || extraData === void 0 ? void 0 : extraData.animated, drawings: imageData === null || imageData === void 0 ? void 0 : imageData.drawings, annotations: annotations, onImageClicked: (ev) => !this.isPdf && this.handleImageClick(index, ev) }), ((_b = this.detailViewOptions) === null || _b === void 0 ? void 0 : _b.showDetailInfoAsOverlay) && this.renderDetailViewOverlay(extraData)),
|
1610
1610
|
distance && this.renderDistance(index)
|
@@ -1643,7 +1643,7 @@ const YooFormCaptureComponent = class {
|
|
1643
1643
|
annotations = annotations.filter((text) => (text === null || text === void 0 ? void 0 : text.type) !== 'dot');
|
1644
1644
|
}
|
1645
1645
|
return [
|
1646
|
-
h("div", { class: "image-container" }, h("yoo-photo-editor", { src: imageData.src,
|
1646
|
+
h("div", { class: "image-container" }, h("yoo-photo-editor", { src: imageData.src, display: "preview", zoomable: true, ...(this.isPdf && {
|
1647
1647
|
cloudinaryOptions
|
1648
1648
|
}), animated: extraData === null || extraData === void 0 ? void 0 : extraData.animated, drawings: imageData === null || imageData === void 0 ? void 0 : imageData.drawings, annotations: annotations, onImageClicked: (ev) => !this.isPdf && this.handleImageClick(index, ev) }), ((_b = this.detailViewOptions) === null || _b === void 0 ? void 0 : _b.showDetailInfoAsOverlay) && this.renderDetailViewOverlay(extraData)),
|
1649
1649
|
distance && this.renderDistance(index)
|
@@ -344,8 +344,8 @@ const YooPhotoEditorComponent = class {
|
|
344
344
|
return this.isDrawMode || this.isTextMode || this.isDotMode;
|
345
345
|
}
|
346
346
|
get isImageZoomable() {
|
347
|
-
var _a;
|
348
|
-
return ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && (this.zoomable
|
347
|
+
var _a, _b;
|
348
|
+
return this.isReadonly && ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && ((_b = this.zoomable) !== null && _b !== void 0 ? _b : !this.isPreview);
|
349
349
|
}
|
350
350
|
get isImageZoomed() {
|
351
351
|
return getTransformInfos(this.imageElement).scaleX > 1;
|
@@ -709,9 +709,9 @@ const YooPhotoEditorComponent = class {
|
|
709
709
|
var _a;
|
710
710
|
this.isTextEditMode && ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.blur());
|
711
711
|
}
|
712
|
-
toggleColorSelector() {
|
712
|
+
toggleColorSelector(forceShow) {
|
713
713
|
var _a, _b;
|
714
|
-
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', this.isEditMode && !this.hasDiscardBeenClicked);
|
714
|
+
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', forceShow !== null && forceShow !== void 0 ? forceShow : (this.isEditMode && !this.hasDiscardBeenClicked));
|
715
715
|
}
|
716
716
|
toggleSaveButton(forceShow) {
|
717
717
|
if (getActionButton().validate) {
|
@@ -1282,6 +1282,7 @@ const YooPhotoEditorComponent = class {
|
|
1282
1282
|
this.lastMode = this.mode;
|
1283
1283
|
this.hasDoneBeenClicked = true;
|
1284
1284
|
this.leaveColorPickerMode();
|
1285
|
+
this.toggleColorSelector(false);
|
1285
1286
|
if (this.isTextCreateMode) {
|
1286
1287
|
if ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.textContent) {
|
1287
1288
|
this.createTextBox();
|
@@ -1417,7 +1418,7 @@ const YooPhotoEditorComponent = class {
|
|
1417
1418
|
return h("canvas", { id: "src", onClick: (ev) => ev.preventDefault(), ref: el => this.canvasSrcElement = el, ...this.computedImageSize });
|
1418
1419
|
}
|
1419
1420
|
renderImage() {
|
1420
|
-
var _a, _b, _c, _d;
|
1421
|
+
var _a, _b, _c, _d, _e;
|
1421
1422
|
return (h("yoo-img", { instant: true, id: "src", src: this.finalSrc, ignoreHeight: true, ignoreWidth: true, disableAspectRatioCalc: true, allowCloudinary: false, ...((this.isPreview && !this.isImageZoomable) && {
|
1422
1423
|
cloudinaryOptions: {
|
1423
1424
|
width: (_b = (_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.resized) === null || _b === void 0 ? void 0 : _b.width,
|
@@ -1428,7 +1429,7 @@ const YooPhotoEditorComponent = class {
|
|
1428
1429
|
}), ref: el => this.imageElement = el, style: {
|
1429
1430
|
...this.computedImageSizeStyle,
|
1430
1431
|
...(this.isImageZoomable && {
|
1431
|
-
transform: `scale(${this.imageSize.scaleFactor})`
|
1432
|
+
transform: `scale(${(_e = this.imageSize) === null || _e === void 0 ? void 0 : _e.scaleFactor})`
|
1432
1433
|
})
|
1433
1434
|
} }));
|
1434
1435
|
}
|
@@ -1643,7 +1643,7 @@ const YooFormCaptureComponent = class {
|
|
1643
1643
|
annotations = annotations.filter((text) => (text === null || text === void 0 ? void 0 : text.type) !== 'dot');
|
1644
1644
|
}
|
1645
1645
|
return [
|
1646
|
-
h("div", { class: "image-container" }, h("yoo-photo-editor", { src: imageData.src,
|
1646
|
+
h("div", { class: "image-container" }, h("yoo-photo-editor", { src: imageData.src, display: "preview", zoomable: true, ...(this.isPdf && {
|
1647
1647
|
cloudinaryOptions
|
1648
1648
|
}), animated: extraData === null || extraData === void 0 ? void 0 : extraData.animated, drawings: imageData === null || imageData === void 0 ? void 0 : imageData.drawings, annotations: annotations, onImageClicked: (ev) => !this.isPdf && this.handleImageClick(index, ev) }), ((_b = this.detailViewOptions) === null || _b === void 0 ? void 0 : _b.showDetailInfoAsOverlay) && this.renderDetailViewOverlay(extraData)),
|
1649
1649
|
distance && this.renderDistance(index)
|
@@ -344,8 +344,8 @@ const YooPhotoEditorComponent = class {
|
|
344
344
|
return this.isDrawMode || this.isTextMode || this.isDotMode;
|
345
345
|
}
|
346
346
|
get isImageZoomable() {
|
347
|
-
var _a;
|
348
|
-
return ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && (this.zoomable
|
347
|
+
var _a, _b;
|
348
|
+
return this.isReadonly && ((_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.scaleFactor) < 1 && ((_b = this.zoomable) !== null && _b !== void 0 ? _b : !this.isPreview);
|
349
349
|
}
|
350
350
|
get isImageZoomed() {
|
351
351
|
return getTransformInfos(this.imageElement).scaleX > 1;
|
@@ -709,9 +709,9 @@ const YooPhotoEditorComponent = class {
|
|
709
709
|
var _a;
|
710
710
|
this.isTextEditMode && ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.blur());
|
711
711
|
}
|
712
|
-
toggleColorSelector() {
|
712
|
+
toggleColorSelector(forceShow) {
|
713
713
|
var _a, _b;
|
714
|
-
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', this.isEditMode && !this.hasDiscardBeenClicked);
|
714
|
+
(_b = (_a = this.footerElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.toggle('active', forceShow !== null && forceShow !== void 0 ? forceShow : (this.isEditMode && !this.hasDiscardBeenClicked));
|
715
715
|
}
|
716
716
|
toggleSaveButton(forceShow) {
|
717
717
|
if (getActionButton().validate) {
|
@@ -1282,6 +1282,7 @@ const YooPhotoEditorComponent = class {
|
|
1282
1282
|
this.lastMode = this.mode;
|
1283
1283
|
this.hasDoneBeenClicked = true;
|
1284
1284
|
this.leaveColorPickerMode();
|
1285
|
+
this.toggleColorSelector(false);
|
1285
1286
|
if (this.isTextCreateMode) {
|
1286
1287
|
if ((_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.textContent) {
|
1287
1288
|
this.createTextBox();
|
@@ -1417,7 +1418,7 @@ const YooPhotoEditorComponent = class {
|
|
1417
1418
|
return h("canvas", { id: "src", onClick: (ev) => ev.preventDefault(), ref: el => this.canvasSrcElement = el, ...this.computedImageSize });
|
1418
1419
|
}
|
1419
1420
|
renderImage() {
|
1420
|
-
var _a, _b, _c, _d;
|
1421
|
+
var _a, _b, _c, _d, _e;
|
1421
1422
|
return (h("yoo-img", { instant: true, id: "src", src: this.finalSrc, ignoreHeight: true, ignoreWidth: true, disableAspectRatioCalc: true, allowCloudinary: false, ...((this.isPreview && !this.isImageZoomable) && {
|
1422
1423
|
cloudinaryOptions: {
|
1423
1424
|
width: (_b = (_a = this.imageSize) === null || _a === void 0 ? void 0 : _a.resized) === null || _b === void 0 ? void 0 : _b.width,
|
@@ -1428,7 +1429,7 @@ const YooPhotoEditorComponent = class {
|
|
1428
1429
|
}), ref: el => this.imageElement = el, style: {
|
1429
1430
|
...this.computedImageSizeStyle,
|
1430
1431
|
...(this.isImageZoomable && {
|
1431
|
-
transform: `scale(${this.imageSize.scaleFactor})`
|
1432
|
+
transform: `scale(${(_e = this.imageSize) === null || _e === void 0 ? void 0 : _e.scaleFactor})`
|
1432
1433
|
})
|
1433
1434
|
} }));
|
1434
1435
|
}
|