@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
|
@@ -2947,7 +2947,6 @@ class ImageFieldTemplateComponent {
|
|
|
2947
2947
|
};
|
|
2948
2948
|
}
|
|
2949
2949
|
ngOnInit() {
|
|
2950
|
-
console.log("RECORD", this.record, this.field);
|
|
2951
2950
|
if (this.record[this.field.Name] == null || this.record[this.field.Name] == 0) {
|
|
2952
2951
|
this.FileDataBase64 = this.field.DynAttachment.FileDataBase64;
|
|
2953
2952
|
this.imageWidth = (this.field.DynAttachment.ResizedImageHeightPx / this.field.DynAttachment.ImageHeightPx * this.field.DynAttachment.ImageWidthPx) + 50;
|
|
@@ -3103,6 +3102,7 @@ class ImageFieldTemplateComponent {
|
|
|
3103
3102
|
this.dialogImageDrawingRef = this.dialog.open(this.dialogImageDrawing, {
|
|
3104
3103
|
disableClose: true,
|
|
3105
3104
|
hasBackdrop: true,
|
|
3105
|
+
panelClass: 'image-modal',
|
|
3106
3106
|
width: '75%'
|
|
3107
3107
|
});
|
|
3108
3108
|
if (this.AttachmentID != null && Number(this.AttachmentID) > 0) {
|
|
@@ -3313,6 +3313,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3313
3313
|
class TmwImageMarkerComponent {
|
|
3314
3314
|
constructor() {
|
|
3315
3315
|
this.inConfig = false;
|
|
3316
|
+
this.savedMarkers = null;
|
|
3316
3317
|
this.outputMimeType = 'image/jpeg';
|
|
3317
3318
|
this.outputQuality = 0.8;
|
|
3318
3319
|
this.forceSizeCanvas = true;
|
|
@@ -3358,7 +3359,23 @@ class TmwImageMarkerComponent {
|
|
|
3358
3359
|
this.setUndoRedo();
|
|
3359
3360
|
});
|
|
3360
3361
|
}
|
|
3361
|
-
|
|
3362
|
+
newMarker() {
|
|
3363
|
+
var startX = Math.floor(this.width / 2);
|
|
3364
|
+
var startY = Math.floor(this.height / 2);
|
|
3365
|
+
var left = this.randomIntFromInterval(startX - 100, startX + 100);
|
|
3366
|
+
var top = this.randomIntFromInterval(startY - 100, startY + 100);
|
|
3367
|
+
var description;
|
|
3368
|
+
var caption = '0';
|
|
3369
|
+
// Creazione della caption
|
|
3370
|
+
for (var i = 1; i <= 100000; i++) {
|
|
3371
|
+
if (this.markers.find(x => x.caption == i.toString()) == null) {
|
|
3372
|
+
caption = i.toString();
|
|
3373
|
+
break;
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
this.createMarker(top, left, caption, description);
|
|
3377
|
+
}
|
|
3378
|
+
createMarker(top, left, caption, description) {
|
|
3362
3379
|
/*
|
|
3363
3380
|
* Creo un nuovo Marker
|
|
3364
3381
|
*/
|
|
@@ -3373,28 +3390,36 @@ class TmwImageMarkerComponent {
|
|
|
3373
3390
|
originY: 'center'
|
|
3374
3391
|
});
|
|
3375
3392
|
// Creo il testo dentro al cerchio
|
|
3376
|
-
var caption = (this.markers.length + 1).toString();
|
|
3377
3393
|
var text = new fabric.Text(caption, { fontSize: 25,
|
|
3378
3394
|
originX: 'center',
|
|
3379
3395
|
originY: 'center',
|
|
3380
3396
|
fill: 'white'
|
|
3381
3397
|
});
|
|
3382
3398
|
// Creo il gruppo nel quale metto cerchio e testo in modo che si muovano insieme
|
|
3383
|
-
var
|
|
3384
|
-
var startY = Math.floor(this.height / 2);
|
|
3385
|
-
var group = new fabric.Group([circle, text], { left: this.randomIntFromInterval(startX - 100, startX + 100), top: this.randomIntFromInterval(startY - 100, startY + 100) });
|
|
3399
|
+
var group = new fabric.Group([circle, text], { left: left, top: top });
|
|
3386
3400
|
// Creo un oggetto marker che contiene gli elementi atomici. Serve per le cancellazioni e il rollback/modifica degli elementi
|
|
3387
3401
|
var marker = new Marker();
|
|
3388
3402
|
marker.circle = circle;
|
|
3389
3403
|
marker.text = text;
|
|
3390
3404
|
marker.group = group;
|
|
3391
3405
|
marker.caption = caption;
|
|
3392
|
-
marker.description =
|
|
3406
|
+
marker.description = description;
|
|
3393
3407
|
// Aggiungo il gruppo nella lista dei gruppi
|
|
3394
3408
|
this.markers.push(marker);
|
|
3409
|
+
this.markers.sort((a, b) => { return Number(a.caption) - Number(b.caption); });
|
|
3395
3410
|
// Aggiungo il gruppo all'immagine a schermo
|
|
3396
3411
|
this.canvas.add(group);
|
|
3397
3412
|
}
|
|
3413
|
+
deleteMarkerByIndex(index) {
|
|
3414
|
+
this.canvas.remove(this.markers[index].group);
|
|
3415
|
+
this.markers.splice(index, 1);
|
|
3416
|
+
}
|
|
3417
|
+
removeAllMarkers() {
|
|
3418
|
+
this.markers.forEach((marker) => {
|
|
3419
|
+
this.canvas.remove(marker.group);
|
|
3420
|
+
});
|
|
3421
|
+
this.markers = new Array();
|
|
3422
|
+
}
|
|
3398
3423
|
setUndoRedo() {
|
|
3399
3424
|
this.canUndo = this.canvas.getObjects().length > 0;
|
|
3400
3425
|
this.canRedo = this.stack.length > 0;
|
|
@@ -3479,10 +3504,18 @@ class TmwImageMarkerComponent {
|
|
|
3479
3504
|
originY: 'top'
|
|
3480
3505
|
});
|
|
3481
3506
|
});
|
|
3507
|
+
if (this.savedMarkers != null) {
|
|
3508
|
+
this.loadMarkers();
|
|
3509
|
+
}
|
|
3482
3510
|
};
|
|
3483
3511
|
}
|
|
3512
|
+
loadMarkers() {
|
|
3513
|
+
var markersObj = JSON.parse(this.savedMarkers);
|
|
3514
|
+
markersObj.forEach((marker) => {
|
|
3515
|
+
this.createMarker(marker.top, marker.left, marker.caption, marker.description);
|
|
3516
|
+
});
|
|
3517
|
+
}
|
|
3484
3518
|
saveImage() {
|
|
3485
|
-
console.log("Dati attualmente presenti", this.markers, this.canvas.getObjects());
|
|
3486
3519
|
this.outmarkers = new Array();
|
|
3487
3520
|
this.markers.forEach((marker) => {
|
|
3488
3521
|
var outmarker = new OutMarker();
|
|
@@ -3492,7 +3525,6 @@ class TmwImageMarkerComponent {
|
|
|
3492
3525
|
outmarker.left = marker.group.left;
|
|
3493
3526
|
this.outmarkers.push(outmarker);
|
|
3494
3527
|
});
|
|
3495
|
-
console.log("OUT MARKERS", this.outmarkers);
|
|
3496
3528
|
if (this.width && this.height) {
|
|
3497
3529
|
const canvasScaledElement = document.createElement('canvas');
|
|
3498
3530
|
const canvasScaled = new fabric.Canvas(canvasScaledElement);
|
|
@@ -3569,10 +3601,10 @@ class TmwImageMarkerComponent {
|
|
|
3569
3601
|
}
|
|
3570
3602
|
}
|
|
3571
3603
|
TmwImageMarkerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TmwImageMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3572
|
-
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)=\"
|
|
3604
|
+
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"] }] });
|
|
3573
3605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TmwImageMarkerComponent, decorators: [{
|
|
3574
3606
|
type: Component,
|
|
3575
|
-
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)=\"
|
|
3607
|
+
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"] }]
|
|
3576
3608
|
}], ctorParameters: function () { return []; }, propDecorators: { src: [{
|
|
3577
3609
|
type: Input
|
|
3578
3610
|
}], width: [{
|
|
@@ -3581,6 +3613,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3581
3613
|
type: Input
|
|
3582
3614
|
}], inConfig: [{
|
|
3583
3615
|
type: Input
|
|
3616
|
+
}], savedMarkers: [{
|
|
3617
|
+
type: Input
|
|
3584
3618
|
}], outputMimeType: [{
|
|
3585
3619
|
type: Input
|
|
3586
3620
|
}], outputQuality: [{
|
|
@@ -3629,6 +3663,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3629
3663
|
this.FileBase64 = "";
|
|
3630
3664
|
this.MarkFileBase64 = "";
|
|
3631
3665
|
this.FileDataBase64 = "";
|
|
3666
|
+
this.extraJSON = null;
|
|
3632
3667
|
//preLoadedImageMetadataFormGroup: UntypedFormGroup;
|
|
3633
3668
|
//#region Proprietà per configurare il componente ngx-image-Marking e aprire il relativo dialog.
|
|
3634
3669
|
this.width = null;
|
|
@@ -3655,11 +3690,11 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3655
3690
|
this.FileDataBase64 = this.record[this.field.Name].FileDataBase64;
|
|
3656
3691
|
}
|
|
3657
3692
|
this.record[this.field.Name].FileDataBase64 = this.FileDataBase64;
|
|
3693
|
+
this.extraJSON = this.record[this.field.Name].ExtraJSON;
|
|
3658
3694
|
this.imageMarkAttachment = this.record[this.field.Name];
|
|
3659
3695
|
this.imageMarkAttachment.FileDataBase64 = this.FileDataBase64;
|
|
3660
|
-
this.AttachmentID = this.
|
|
3696
|
+
this.AttachmentID = this.field.DynAttachment.ID;
|
|
3661
3697
|
}
|
|
3662
|
-
console.log("image-with-markers-field-template", this.imageWidth);
|
|
3663
3698
|
this.recordChange.emit(this.record);
|
|
3664
3699
|
// Clono l'attachment originale, gli cambio il FileBase e gli azzero l'ID
|
|
3665
3700
|
// this.imageMarkAttachment.FileName = "";
|
|
@@ -3732,6 +3767,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3732
3767
|
// Clono l'attachment originale, gli cambio il FileBase e gli azzero l'ID
|
|
3733
3768
|
this.imageMarkAttachment.FileDataBase64 = this.MarkFileBase64;
|
|
3734
3769
|
this.imageMarkAttachment.ExtraJSON = JSON.stringify(markedImage.outmarkers);
|
|
3770
|
+
this.extraJSON = this.imageMarkAttachment.ExtraJSON;
|
|
3735
3771
|
this.imageMark.emit(this.imageMarkAttachment);
|
|
3736
3772
|
}
|
|
3737
3773
|
if (this.dialogImageMarkingRef) {
|
|
@@ -3792,6 +3828,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3792
3828
|
this.dialogImageMarkingRef = this.dialog.open(this.dialogImageMarking, {
|
|
3793
3829
|
disableClose: true,
|
|
3794
3830
|
hasBackdrop: true,
|
|
3831
|
+
panelClass: 'image-modal',
|
|
3795
3832
|
width: '75%'
|
|
3796
3833
|
});
|
|
3797
3834
|
if (this.AttachmentID != null && Number(this.AttachmentID) > 0) {
|
|
@@ -3825,10 +3862,10 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3825
3862
|
}
|
|
3826
3863
|
}
|
|
3827
3864
|
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 });
|
|
3828
|
-
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"] }] });
|
|
3865
|
+
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"] }] });
|
|
3829
3866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageWithMarkersFieldTemplateComponent, decorators: [{
|
|
3830
3867
|
type: Component,
|
|
3831
|
-
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"] }]
|
|
3868
|
+
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"] }]
|
|
3832
3869
|
}], ctorParameters: function () { return [{ type: i1$2.MatDialog }, { type: UtilityHelperService }]; }, propDecorators: { endPointConfiguration: [{
|
|
3833
3870
|
type: Input
|
|
3834
3871
|
}], record: [{
|
|
@@ -5342,7 +5379,6 @@ class ListViewFormRecordComponent {
|
|
|
5342
5379
|
* "onlyView" = booleano (se TRUE siamo in visualizzazione altrimenti in modifica)
|
|
5343
5380
|
*/
|
|
5344
5381
|
onAddViewEditRecord2(event) {
|
|
5345
|
-
console.log("STO QUI DENTRO!!!!!!!");
|
|
5346
5382
|
this.loader = false;
|
|
5347
5383
|
this.selectedRecord = null;
|
|
5348
5384
|
this.onlyView = event.onlyView;
|
|
@@ -9046,7 +9082,6 @@ class AddFormFieldComponent {
|
|
|
9046
9082
|
});
|
|
9047
9083
|
}
|
|
9048
9084
|
setResizedImagesHeightPx() {
|
|
9049
|
-
console.log("setResizedImagesHeightPx", this.field.ResizedImagesHeightPx);
|
|
9050
9085
|
this.resizedImagesHeightPx = this.field.ResizedImagesHeightPx;
|
|
9051
9086
|
}
|
|
9052
9087
|
deleteListImage(el, i, col) {
|
|
@@ -9419,7 +9454,6 @@ class EqpDynamicModuleConfiguratorComponent {
|
|
|
9419
9454
|
if (this.selectedField.AnswerStyle == null) {
|
|
9420
9455
|
this.selectedField.AnswerStyle = { InListView: true, VisibleIf: null, FieldstyleCSS: "", LabelstyleCSS: "", ColSpanSizes: [] };
|
|
9421
9456
|
}
|
|
9422
|
-
console.log('this.selectedField', this.selectedField);
|
|
9423
9457
|
}
|
|
9424
9458
|
else {
|
|
9425
9459
|
this.selectedField = new BaseField();
|