@eqproject/eqp-dynamic-module 2.4.6 → 2.4.8
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/esm2020/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.mjs +1 -2
- package/esm2020/lib/components/private/add-form-field/add-form-field.component.mjs +1 -2
- package/esm2020/lib/components/private/field-templates/image-field-template/image-field-template.component.mjs +2 -2
- package/esm2020/lib/components/private/field-templates/image-with-markers-field-template/image-with-markers-field-template.component.mjs +8 -5
- package/esm2020/lib/components/private/form-records/list-view-form-record/list-view-form-record.component.mjs +1 -2
- package/esm2020/lib/components/private/tmw-image-marker/tmw-image-marker.component.mjs +48 -13
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +52 -18
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +52 -18
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/lib/components/private/field-templates/image-with-markers-field-template/image-with-markers-field-template.component.d.ts +1 -0
- package/lib/components/private/tmw-image-marker/tmw-image-marker.component.d.ts +7 -2
- package/package.json +1 -1
|
@@ -2942,7 +2942,6 @@ class ImageFieldTemplateComponent {
|
|
|
2942
2942
|
};
|
|
2943
2943
|
}
|
|
2944
2944
|
ngOnInit() {
|
|
2945
|
-
console.log("RECORD", this.record, this.field);
|
|
2946
2945
|
if (this.record[this.field.Name] == null || this.record[this.field.Name] == 0) {
|
|
2947
2946
|
this.FileDataBase64 = this.field.DynAttachment.FileDataBase64;
|
|
2948
2947
|
this.imageWidth = (this.field.DynAttachment.ResizedImageHeightPx / this.field.DynAttachment.ImageHeightPx * this.field.DynAttachment.ImageWidthPx) + 50;
|
|
@@ -3096,6 +3095,7 @@ class ImageFieldTemplateComponent {
|
|
|
3096
3095
|
this.dialogImageDrawingRef = this.dialog.open(this.dialogImageDrawing, {
|
|
3097
3096
|
disableClose: true,
|
|
3098
3097
|
hasBackdrop: true,
|
|
3098
|
+
panelClass: 'image-modal',
|
|
3099
3099
|
width: '75%'
|
|
3100
3100
|
});
|
|
3101
3101
|
if (this.AttachmentID != null && Number(this.AttachmentID) > 0) {
|
|
@@ -3306,6 +3306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3306
3306
|
class TmwImageMarkerComponent {
|
|
3307
3307
|
constructor() {
|
|
3308
3308
|
this.inConfig = false;
|
|
3309
|
+
this.savedMarkers = null;
|
|
3309
3310
|
this.outputMimeType = 'image/jpeg';
|
|
3310
3311
|
this.outputQuality = 0.8;
|
|
3311
3312
|
this.forceSizeCanvas = true;
|
|
@@ -3351,7 +3352,23 @@ class TmwImageMarkerComponent {
|
|
|
3351
3352
|
this.setUndoRedo();
|
|
3352
3353
|
});
|
|
3353
3354
|
}
|
|
3354
|
-
|
|
3355
|
+
newMarker() {
|
|
3356
|
+
var startX = Math.floor(this.width / 2);
|
|
3357
|
+
var startY = Math.floor(this.height / 2);
|
|
3358
|
+
var left = this.randomIntFromInterval(startX - 100, startX + 100);
|
|
3359
|
+
var top = this.randomIntFromInterval(startY - 100, startY + 100);
|
|
3360
|
+
var description;
|
|
3361
|
+
var caption = '0';
|
|
3362
|
+
// Creazione della caption
|
|
3363
|
+
for (var i = 1; i <= 100000; i++) {
|
|
3364
|
+
if (this.markers.find(x => x.caption == i.toString()) == null) {
|
|
3365
|
+
caption = i.toString();
|
|
3366
|
+
break;
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
this.createMarker(top, left, caption, description);
|
|
3370
|
+
}
|
|
3371
|
+
createMarker(top, left, caption, description) {
|
|
3355
3372
|
/*
|
|
3356
3373
|
* Creo un nuovo Marker
|
|
3357
3374
|
*/
|
|
@@ -3366,28 +3383,36 @@ class TmwImageMarkerComponent {
|
|
|
3366
3383
|
originY: 'center'
|
|
3367
3384
|
});
|
|
3368
3385
|
// Creo il testo dentro al cerchio
|
|
3369
|
-
var caption = (this.markers.length + 1).toString();
|
|
3370
3386
|
var text = new fabric.Text(caption, { fontSize: 25,
|
|
3371
3387
|
originX: 'center',
|
|
3372
3388
|
originY: 'center',
|
|
3373
3389
|
fill: 'white'
|
|
3374
3390
|
});
|
|
3375
3391
|
// Creo il gruppo nel quale metto cerchio e testo in modo che si muovano insieme
|
|
3376
|
-
var
|
|
3377
|
-
var startY = Math.floor(this.height / 2);
|
|
3378
|
-
var group = new fabric.Group([circle, text], { left: this.randomIntFromInterval(startX - 100, startX + 100), top: this.randomIntFromInterval(startY - 100, startY + 100) });
|
|
3392
|
+
var group = new fabric.Group([circle, text], { left: left, top: top });
|
|
3379
3393
|
// Creo un oggetto marker che contiene gli elementi atomici. Serve per le cancellazioni e il rollback/modifica degli elementi
|
|
3380
3394
|
var marker = new Marker();
|
|
3381
3395
|
marker.circle = circle;
|
|
3382
3396
|
marker.text = text;
|
|
3383
3397
|
marker.group = group;
|
|
3384
3398
|
marker.caption = caption;
|
|
3385
|
-
marker.description =
|
|
3399
|
+
marker.description = description;
|
|
3386
3400
|
// Aggiungo il gruppo nella lista dei gruppi
|
|
3387
3401
|
this.markers.push(marker);
|
|
3402
|
+
this.markers.sort((a, b) => { return Number(a.caption) - Number(b.caption); });
|
|
3388
3403
|
// Aggiungo il gruppo all'immagine a schermo
|
|
3389
3404
|
this.canvas.add(group);
|
|
3390
3405
|
}
|
|
3406
|
+
deleteMarkerByIndex(index) {
|
|
3407
|
+
this.canvas.remove(this.markers[index].group);
|
|
3408
|
+
this.markers.splice(index, 1);
|
|
3409
|
+
}
|
|
3410
|
+
removeAllMarkers() {
|
|
3411
|
+
this.markers.forEach((marker) => {
|
|
3412
|
+
this.canvas.remove(marker.group);
|
|
3413
|
+
});
|
|
3414
|
+
this.markers = new Array();
|
|
3415
|
+
}
|
|
3391
3416
|
setUndoRedo() {
|
|
3392
3417
|
this.canUndo = this.canvas.getObjects().length > 0;
|
|
3393
3418
|
this.canRedo = this.stack.length > 0;
|
|
@@ -3472,10 +3497,18 @@ class TmwImageMarkerComponent {
|
|
|
3472
3497
|
originY: 'top'
|
|
3473
3498
|
});
|
|
3474
3499
|
});
|
|
3500
|
+
if (this.savedMarkers != null) {
|
|
3501
|
+
this.loadMarkers();
|
|
3502
|
+
}
|
|
3475
3503
|
};
|
|
3476
3504
|
}
|
|
3505
|
+
loadMarkers() {
|
|
3506
|
+
var markersObj = JSON.parse(this.savedMarkers);
|
|
3507
|
+
markersObj.forEach((marker) => {
|
|
3508
|
+
this.createMarker(marker.top, marker.left, marker.caption, marker.description);
|
|
3509
|
+
});
|
|
3510
|
+
}
|
|
3477
3511
|
saveImage() {
|
|
3478
|
-
console.log("Dati attualmente presenti", this.markers, this.canvas.getObjects());
|
|
3479
3512
|
this.outmarkers = new Array();
|
|
3480
3513
|
this.markers.forEach((marker) => {
|
|
3481
3514
|
var outmarker = new OutMarker();
|
|
@@ -3485,7 +3518,6 @@ class TmwImageMarkerComponent {
|
|
|
3485
3518
|
outmarker.left = marker.group.left;
|
|
3486
3519
|
this.outmarkers.push(outmarker);
|
|
3487
3520
|
});
|
|
3488
|
-
console.log("OUT MARKERS", this.outmarkers);
|
|
3489
3521
|
if (this.width && this.height) {
|
|
3490
3522
|
const canvasScaledElement = document.createElement('canvas');
|
|
3491
3523
|
const canvasScaled = new fabric.Canvas(canvasScaledElement);
|
|
@@ -3562,10 +3594,10 @@ class TmwImageMarkerComponent {
|
|
|
3562
3594
|
}
|
|
3563
3595
|
}
|
|
3564
3596
|
TmwImageMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TmwImageMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3565
|
-
TmwImageMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TmwImageMarkerComponent, selector: "tmw-image-marker", inputs: { src: "src", width: "width", height: "height", inConfig: "inConfig", outputMimeType: "outputMimeType", outputQuality: "outputQuality", forceSizeCanvas: "forceSizeCanvas" }, outputs: { closeDialog: "closeDialog", save: "save" }, ngImport: i0, template: "<div class=\"canvas-container\">\r\n <div class=\"canvas\">\r\n <canvas [id]=\"componentGuid\"></canvas>\r\n </div>\r\n <div class=\"toolbox\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <button class=\"btn btn-primary markerButton\" (click)=\"
|
|
3597
|
+
TmwImageMarkerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TmwImageMarkerComponent, selector: "tmw-image-marker", inputs: { src: "src", width: "width", height: "height", inConfig: "inConfig", savedMarkers: "savedMarkers", outputMimeType: "outputMimeType", outputQuality: "outputQuality", forceSizeCanvas: "forceSizeCanvas" }, outputs: { closeDialog: "closeDialog", save: "save" }, ngImport: i0, template: "<div class=\"canvas-container\">\r\n <div class=\"canvas\">\r\n <canvas [id]=\"componentGuid\"></canvas>\r\n </div>\r\n <div class=\"toolbox\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <button class=\"btn btn-primary markerButton\" (click)=\"newMarker()\">Crea nuovo marker</button>\r\n </div>\r\n <div class=\"col-12 mt-2\">\r\n\r\n <div class=\"legend_overflow_container\">\r\n <div class=\"legend_container\" *ngFor=\"let marker of markers; index as i\">\r\n <div class=\"caption\" [innerHTML]=\"marker.caption\"></div>\r\n <div class=\"textarea\"><textarea [(ngModel)]=\"marker.description\" (click)=\"log(marker.description)\"></textarea></div>\r\n <div class=\"delete\" (click)=\"deleteMarkerByIndex(i)\"><mat-icon>delete</mat-icon></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"col-12 mt-2\" *ngIf=\"!inConfig\">\r\n <button class=\"btn btn-success markerButton\" (click)=\"saveImage()\">Salva Immagine</button>\r\n </div>\r\n <div class=\"col-12 mt-2\">\r\n <button class=\"btn btn-warning markerButton\" (click)=\"removeAllMarkers()\">Rimuovi tutti i markers</button>\r\n </div> \r\n <div class=\"col-12 mt-2\">\r\n <button class=\"btn btn-danger markerButton\" (click)=\"close()\">Annulla Disegno</button>\r\n </div>\r\n </div>\r\n \r\n\r\n\r\n\r\n </div>\r\n</div>", styles: [".canvas-container{display:flex;flex-flow:row}.canvas-container>.toolbox{width:100%;padding:0 10px}.canvas-container>.toolbox .markerButton{width:100%}.canvas-container>.toolbox .legend_overflow_container{overflow-y:auto;max-height:500px}.canvas-container>.toolbox .legend_overflow_container .legend_container{display:flex;flex-flow:row;padding:5px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.caption{display:flex;justify-content:center;align-items:center;width:30px;background-color:#00008b;color:#fff;margin-right:5px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.textarea{width:100%;height:35px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.textarea textarea{width:100%;height:35px;padding:4px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.delete{display:flex;justify-content:center;align-items:center;width:30px;background-color:red;color:#fff;margin-left:5px;cursor:pointer}.canvas-container>.toolbox .legend_overflow_container .legend_container>.delete mat-icon{padding:0;margin:0;width:16px;height:16px}\n"], dependencies: [{ kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3566
3598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TmwImageMarkerComponent, decorators: [{
|
|
3567
3599
|
type: Component,
|
|
3568
|
-
args: [{ selector: 'tmw-image-marker', template: "<div class=\"canvas-container\">\r\n <div class=\"canvas\">\r\n <canvas [id]=\"componentGuid\"></canvas>\r\n </div>\r\n <div class=\"toolbox\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <button class=\"btn btn-primary markerButton\" (click)=\"
|
|
3600
|
+
args: [{ selector: 'tmw-image-marker', template: "<div class=\"canvas-container\">\r\n <div class=\"canvas\">\r\n <canvas [id]=\"componentGuid\"></canvas>\r\n </div>\r\n <div class=\"toolbox\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <button class=\"btn btn-primary markerButton\" (click)=\"newMarker()\">Crea nuovo marker</button>\r\n </div>\r\n <div class=\"col-12 mt-2\">\r\n\r\n <div class=\"legend_overflow_container\">\r\n <div class=\"legend_container\" *ngFor=\"let marker of markers; index as i\">\r\n <div class=\"caption\" [innerHTML]=\"marker.caption\"></div>\r\n <div class=\"textarea\"><textarea [(ngModel)]=\"marker.description\" (click)=\"log(marker.description)\"></textarea></div>\r\n <div class=\"delete\" (click)=\"deleteMarkerByIndex(i)\"><mat-icon>delete</mat-icon></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"col-12 mt-2\" *ngIf=\"!inConfig\">\r\n <button class=\"btn btn-success markerButton\" (click)=\"saveImage()\">Salva Immagine</button>\r\n </div>\r\n <div class=\"col-12 mt-2\">\r\n <button class=\"btn btn-warning markerButton\" (click)=\"removeAllMarkers()\">Rimuovi tutti i markers</button>\r\n </div> \r\n <div class=\"col-12 mt-2\">\r\n <button class=\"btn btn-danger markerButton\" (click)=\"close()\">Annulla Disegno</button>\r\n </div>\r\n </div>\r\n \r\n\r\n\r\n\r\n </div>\r\n</div>", styles: [".canvas-container{display:flex;flex-flow:row}.canvas-container>.toolbox{width:100%;padding:0 10px}.canvas-container>.toolbox .markerButton{width:100%}.canvas-container>.toolbox .legend_overflow_container{overflow-y:auto;max-height:500px}.canvas-container>.toolbox .legend_overflow_container .legend_container{display:flex;flex-flow:row;padding:5px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.caption{display:flex;justify-content:center;align-items:center;width:30px;background-color:#00008b;color:#fff;margin-right:5px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.textarea{width:100%;height:35px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.textarea textarea{width:100%;height:35px;padding:4px}.canvas-container>.toolbox .legend_overflow_container .legend_container>.delete{display:flex;justify-content:center;align-items:center;width:30px;background-color:red;color:#fff;margin-left:5px;cursor:pointer}.canvas-container>.toolbox .legend_overflow_container .legend_container>.delete mat-icon{padding:0;margin:0;width:16px;height:16px}\n"] }]
|
|
3569
3601
|
}], ctorParameters: function () { return []; }, propDecorators: { src: [{
|
|
3570
3602
|
type: Input
|
|
3571
3603
|
}], width: [{
|
|
@@ -3574,6 +3606,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3574
3606
|
type: Input
|
|
3575
3607
|
}], inConfig: [{
|
|
3576
3608
|
type: Input
|
|
3609
|
+
}], savedMarkers: [{
|
|
3610
|
+
type: Input
|
|
3577
3611
|
}], outputMimeType: [{
|
|
3578
3612
|
type: Input
|
|
3579
3613
|
}], outputQuality: [{
|
|
@@ -3622,6 +3656,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3622
3656
|
this.FileBase64 = "";
|
|
3623
3657
|
this.MarkFileBase64 = "";
|
|
3624
3658
|
this.FileDataBase64 = "";
|
|
3659
|
+
this.extraJSON = null;
|
|
3625
3660
|
//preLoadedImageMetadataFormGroup: UntypedFormGroup;
|
|
3626
3661
|
//#region Proprietà per configurare il componente ngx-image-Marking e aprire il relativo dialog.
|
|
3627
3662
|
this.width = null;
|
|
@@ -3648,11 +3683,11 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3648
3683
|
this.FileDataBase64 = this.record[this.field.Name].FileDataBase64;
|
|
3649
3684
|
}
|
|
3650
3685
|
this.record[this.field.Name].FileDataBase64 = this.FileDataBase64;
|
|
3686
|
+
this.extraJSON = this.record[this.field.Name].ExtraJSON;
|
|
3651
3687
|
this.imageMarkAttachment = this.record[this.field.Name];
|
|
3652
3688
|
this.imageMarkAttachment.FileDataBase64 = this.FileDataBase64;
|
|
3653
|
-
this.AttachmentID = this.
|
|
3689
|
+
this.AttachmentID = this.field.DynAttachment.ID;
|
|
3654
3690
|
}
|
|
3655
|
-
console.log("image-with-markers-field-template", this.imageWidth);
|
|
3656
3691
|
this.recordChange.emit(this.record);
|
|
3657
3692
|
// Clono l'attachment originale, gli cambio il FileBase e gli azzero l'ID
|
|
3658
3693
|
// this.imageMarkAttachment.FileName = "";
|
|
@@ -3724,6 +3759,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3724
3759
|
// Clono l'attachment originale, gli cambio il FileBase e gli azzero l'ID
|
|
3725
3760
|
this.imageMarkAttachment.FileDataBase64 = this.MarkFileBase64;
|
|
3726
3761
|
this.imageMarkAttachment.ExtraJSON = JSON.stringify(markedImage.outmarkers);
|
|
3762
|
+
this.extraJSON = this.imageMarkAttachment.ExtraJSON;
|
|
3727
3763
|
this.imageMark.emit(this.imageMarkAttachment);
|
|
3728
3764
|
}
|
|
3729
3765
|
if (this.dialogImageMarkingRef) {
|
|
@@ -3783,6 +3819,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3783
3819
|
this.dialogImageMarkingRef = this.dialog.open(this.dialogImageMarking, {
|
|
3784
3820
|
disableClose: true,
|
|
3785
3821
|
hasBackdrop: true,
|
|
3822
|
+
panelClass: 'image-modal',
|
|
3786
3823
|
width: '75%'
|
|
3787
3824
|
});
|
|
3788
3825
|
if (this.AttachmentID != null && Number(this.AttachmentID) > 0) {
|
|
@@ -3816,10 +3853,10 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3816
3853
|
}
|
|
3817
3854
|
}
|
|
3818
3855
|
ImageWithMarkersFieldTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageWithMarkersFieldTemplateComponent, deps: [{ token: i1$2.MatDialog }, { token: UtilityHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3819
|
-
ImageWithMarkersFieldTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImageWithMarkersFieldTemplateComponent, selector: "image-with-markers-field-template", inputs: { endPointConfiguration: "endPointConfiguration", record: "record", field: "field", inConfig: "inConfig" }, outputs: { recordChange: "recordChange", imageMark: "imageMark" }, viewQueries: [{ propertyName: "dialogImageMarking", first: true, predicate: ["dialogImageMarking"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"row imageContainer\" style=\"width: {{imageWidth}}px;\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">{{field.Description}}</div>\r\n <div class=\"col-12\"><img *ngIf=\"field.DynAttachment\"\r\n src=\"data:{{field.DynAttachment.FileContentType}};base64,{{FileDataBase64}}\"\r\n [height]=\"field.DynAttachment.ResizedImageHeightPx != null ? field.DynAttachment.ResizedImageHeightPx : 128\"\r\n class=\"singleImage\"></div>\r\n <div class=\"col-12 drawButton\">\r\n <button class=\"btn btn-primary btn-w100\" (click)=\"openMark()\">Marca</button>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonkey\" *ngIf=\"field.DynAttachment.ButtonKey != null && field.DynAttachment.ButtonKey != ''\">\r\n <div>Etichetta</div><div>{{field.DynAttachment.ButtonKey}}</div>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonvalue\" *ngIf=\"field.DynAttachment.ButtonValue != null && field.DynAttachment.ButtonValue != ''\"> \r\n <div>Valore</div><div>{{field.DynAttachment.ButtonValue}}</div>\r\n </div>\r\n </div> \r\n</div>\r\n\r\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\r\n<ng-template #dialogImageMarking>\r\n <div class=\"padder\">\r\n <div\r\n class=\"row\">\r\n <div class=\"col-sm-12 col-md-12\">\r\n <tmw-image-marker\r\n *ngIf=\"MarkingLoaded\"\r\n [src]=\"'data:'+ field.DynAttachment.FileContentType + ';base64,'+ FileBase64\" [inConfig]=\"inConfig\"\r\n [width]=\"field.DynAttachment.ImageWidthPx\" [height]=\"field.DynAttachment.ImageHeightPx\" \r\n (save)=\"saveMark($event)\" (closeDialog)=\"closeDialog()\">\r\n </tmw-image-marker>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>", styles: ["::ng-deep image-drawing>button{background-color:var(--primary)!important;color:#fff!important}.imageContainer .singleImage{margin-top:5px;display:block}.drawButton{margin:5px 0}.buttonkey{border-top:1px solid black;padding-top:10px}\n"], dependencies: [{ kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TmwImageMarkerComponent, selector: "tmw-image-marker", inputs: ["src", "width", "height", "inConfig", "outputMimeType", "outputQuality", "forceSizeCanvas"], outputs: ["closeDialog", "save"] }] });
|
|
3856
|
+
ImageWithMarkersFieldTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ImageWithMarkersFieldTemplateComponent, selector: "image-with-markers-field-template", inputs: { endPointConfiguration: "endPointConfiguration", record: "record", field: "field", inConfig: "inConfig" }, outputs: { recordChange: "recordChange", imageMark: "imageMark" }, viewQueries: [{ propertyName: "dialogImageMarking", first: true, predicate: ["dialogImageMarking"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"row imageContainer\" style=\"width: {{imageWidth}}px;\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">{{field.Description}}</div>\r\n <div class=\"col-12\"><img *ngIf=\"field.DynAttachment\"\r\n src=\"data:{{field.DynAttachment.FileContentType}};base64,{{FileDataBase64}}\"\r\n [height]=\"field.DynAttachment.ResizedImageHeightPx != null ? field.DynAttachment.ResizedImageHeightPx : 128\"\r\n class=\"singleImage\"></div>\r\n <div class=\"col-12 drawButton\">\r\n <button class=\"btn btn-primary btn-w100\" (click)=\"openMark()\">Marca</button>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonkey\" *ngIf=\"field.DynAttachment.ButtonKey != null && field.DynAttachment.ButtonKey != ''\">\r\n <div>Etichetta</div><div>{{field.DynAttachment.ButtonKey}}</div>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonvalue\" *ngIf=\"field.DynAttachment.ButtonValue != null && field.DynAttachment.ButtonValue != ''\"> \r\n <div>Valore</div><div>{{field.DynAttachment.ButtonValue}}</div>\r\n </div>\r\n </div> \r\n</div>\r\n\r\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\r\n<ng-template #dialogImageMarking>\r\n <div class=\"padder\">\r\n <div\r\n class=\"row\">\r\n <div class=\"col-sm-12 col-md-12\">\r\n <tmw-image-marker\r\n *ngIf=\"MarkingLoaded\"\r\n [src]=\"'data:'+ field.DynAttachment.FileContentType + ';base64,'+ FileBase64\" [inConfig]=\"inConfig\" [savedMarkers]=\"extraJSON\"\r\n [width]=\"field.DynAttachment.ImageWidthPx\" [height]=\"field.DynAttachment.ImageHeightPx\" \r\n (save)=\"saveMark($event)\" (closeDialog)=\"closeDialog()\">\r\n </tmw-image-marker>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>", styles: ["::ng-deep image-drawing>button{background-color:var(--primary)!important;color:#fff!important}.imageContainer .singleImage{margin-top:5px;display:block}.drawButton{margin:5px 0}.buttonkey{border-top:1px solid black;padding-top:10px}\n"], dependencies: [{ kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TmwImageMarkerComponent, selector: "tmw-image-marker", inputs: ["src", "width", "height", "inConfig", "savedMarkers", "outputMimeType", "outputQuality", "forceSizeCanvas"], outputs: ["closeDialog", "save"] }] });
|
|
3820
3857
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageWithMarkersFieldTemplateComponent, decorators: [{
|
|
3821
3858
|
type: Component,
|
|
3822
|
-
args: [{ selector: 'image-with-markers-field-template', template: "<div class=\"row imageContainer\" style=\"width: {{imageWidth}}px;\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">{{field.Description}}</div>\r\n <div class=\"col-12\"><img *ngIf=\"field.DynAttachment\"\r\n src=\"data:{{field.DynAttachment.FileContentType}};base64,{{FileDataBase64}}\"\r\n [height]=\"field.DynAttachment.ResizedImageHeightPx != null ? field.DynAttachment.ResizedImageHeightPx : 128\"\r\n class=\"singleImage\"></div>\r\n <div class=\"col-12 drawButton\">\r\n <button class=\"btn btn-primary btn-w100\" (click)=\"openMark()\">Marca</button>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonkey\" *ngIf=\"field.DynAttachment.ButtonKey != null && field.DynAttachment.ButtonKey != ''\">\r\n <div>Etichetta</div><div>{{field.DynAttachment.ButtonKey}}</div>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonvalue\" *ngIf=\"field.DynAttachment.ButtonValue != null && field.DynAttachment.ButtonValue != ''\"> \r\n <div>Valore</div><div>{{field.DynAttachment.ButtonValue}}</div>\r\n </div>\r\n </div> \r\n</div>\r\n\r\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\r\n<ng-template #dialogImageMarking>\r\n <div class=\"padder\">\r\n <div\r\n class=\"row\">\r\n <div class=\"col-sm-12 col-md-12\">\r\n <tmw-image-marker\r\n *ngIf=\"MarkingLoaded\"\r\n [src]=\"'data:'+ field.DynAttachment.FileContentType + ';base64,'+ FileBase64\" [inConfig]=\"inConfig\"\r\n [width]=\"field.DynAttachment.ImageWidthPx\" [height]=\"field.DynAttachment.ImageHeightPx\" \r\n (save)=\"saveMark($event)\" (closeDialog)=\"closeDialog()\">\r\n </tmw-image-marker>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>", styles: ["::ng-deep image-drawing>button{background-color:var(--primary)!important;color:#fff!important}.imageContainer .singleImage{margin-top:5px;display:block}.drawButton{margin:5px 0}.buttonkey{border-top:1px solid black;padding-top:10px}\n"] }]
|
|
3859
|
+
args: [{ selector: 'image-with-markers-field-template', template: "<div class=\"row imageContainer\" style=\"width: {{imageWidth}}px;\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">{{field.Description}}</div>\r\n <div class=\"col-12\"><img *ngIf=\"field.DynAttachment\"\r\n src=\"data:{{field.DynAttachment.FileContentType}};base64,{{FileDataBase64}}\"\r\n [height]=\"field.DynAttachment.ResizedImageHeightPx != null ? field.DynAttachment.ResizedImageHeightPx : 128\"\r\n class=\"singleImage\"></div>\r\n <div class=\"col-12 drawButton\">\r\n <button class=\"btn btn-primary btn-w100\" (click)=\"openMark()\">Marca</button>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonkey\" *ngIf=\"field.DynAttachment.ButtonKey != null && field.DynAttachment.ButtonKey != ''\">\r\n <div>Etichetta</div><div>{{field.DynAttachment.ButtonKey}}</div>\r\n </div>\r\n <div class=\"col-12 flex justify-content-around buttonvalue\" *ngIf=\"field.DynAttachment.ButtonValue != null && field.DynAttachment.ButtonValue != ''\"> \r\n <div>Valore</div><div>{{field.DynAttachment.ButtonValue}}</div>\r\n </div>\r\n </div> \r\n</div>\r\n\r\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\r\n<ng-template #dialogImageMarking>\r\n <div class=\"padder\">\r\n <div\r\n class=\"row\">\r\n <div class=\"col-sm-12 col-md-12\">\r\n <tmw-image-marker\r\n *ngIf=\"MarkingLoaded\"\r\n [src]=\"'data:'+ field.DynAttachment.FileContentType + ';base64,'+ FileBase64\" [inConfig]=\"inConfig\" [savedMarkers]=\"extraJSON\"\r\n [width]=\"field.DynAttachment.ImageWidthPx\" [height]=\"field.DynAttachment.ImageHeightPx\" \r\n (save)=\"saveMark($event)\" (closeDialog)=\"closeDialog()\">\r\n </tmw-image-marker>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>", styles: ["::ng-deep image-drawing>button{background-color:var(--primary)!important;color:#fff!important}.imageContainer .singleImage{margin-top:5px;display:block}.drawButton{margin:5px 0}.buttonkey{border-top:1px solid black;padding-top:10px}\n"] }]
|
|
3823
3860
|
}], ctorParameters: function () { return [{ type: i1$2.MatDialog }, { type: UtilityHelperService }]; }, propDecorators: { endPointConfiguration: [{
|
|
3824
3861
|
type: Input
|
|
3825
3862
|
}], record: [{
|
|
@@ -5320,7 +5357,6 @@ class ListViewFormRecordComponent {
|
|
|
5320
5357
|
* "onlyView" = booleano (se TRUE siamo in visualizzazione altrimenti in modifica)
|
|
5321
5358
|
*/
|
|
5322
5359
|
onAddViewEditRecord2(event) {
|
|
5323
|
-
console.log("STO QUI DENTRO!!!!!!!");
|
|
5324
5360
|
this.loader = false;
|
|
5325
5361
|
this.selectedRecord = null;
|
|
5326
5362
|
this.onlyView = event.onlyView;
|
|
@@ -9019,7 +9055,6 @@ class AddFormFieldComponent {
|
|
|
9019
9055
|
});
|
|
9020
9056
|
}
|
|
9021
9057
|
setResizedImagesHeightPx() {
|
|
9022
|
-
console.log("setResizedImagesHeightPx", this.field.ResizedImagesHeightPx);
|
|
9023
9058
|
this.resizedImagesHeightPx = this.field.ResizedImagesHeightPx;
|
|
9024
9059
|
}
|
|
9025
9060
|
deleteListImage(el, i, col) {
|
|
@@ -9392,7 +9427,6 @@ class EqpDynamicModuleConfiguratorComponent {
|
|
|
9392
9427
|
if (this.selectedField.AnswerStyle == null) {
|
|
9393
9428
|
this.selectedField.AnswerStyle = { InListView: true, VisibleIf: null, FieldstyleCSS: "", LabelstyleCSS: "", ColSpanSizes: [] };
|
|
9394
9429
|
}
|
|
9395
|
-
console.log('this.selectedField', this.selectedField);
|
|
9396
9430
|
}
|
|
9397
9431
|
else {
|
|
9398
9432
|
this.selectedField = new BaseField();
|