@eqproject/eqp-dynamic-module 2.4.6 → 2.4.7
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 +1 -2
- package/esm2020/lib/components/private/field-templates/image-with-markers-field-template/image-with-markers-field-template.component.mjs +7 -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 +50 -18
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +50 -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;
|
|
@@ -3306,6 +3305,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3306
3305
|
class TmwImageMarkerComponent {
|
|
3307
3306
|
constructor() {
|
|
3308
3307
|
this.inConfig = false;
|
|
3308
|
+
this.savedMarkers = null;
|
|
3309
3309
|
this.outputMimeType = 'image/jpeg';
|
|
3310
3310
|
this.outputQuality = 0.8;
|
|
3311
3311
|
this.forceSizeCanvas = true;
|
|
@@ -3351,7 +3351,23 @@ class TmwImageMarkerComponent {
|
|
|
3351
3351
|
this.setUndoRedo();
|
|
3352
3352
|
});
|
|
3353
3353
|
}
|
|
3354
|
-
|
|
3354
|
+
newMarker() {
|
|
3355
|
+
var startX = Math.floor(this.width / 2);
|
|
3356
|
+
var startY = Math.floor(this.height / 2);
|
|
3357
|
+
var left = this.randomIntFromInterval(startX - 100, startX + 100);
|
|
3358
|
+
var top = this.randomIntFromInterval(startY - 100, startY + 100);
|
|
3359
|
+
var description;
|
|
3360
|
+
var caption = '0';
|
|
3361
|
+
// Creazione della caption
|
|
3362
|
+
for (var i = 1; i <= 100000; i++) {
|
|
3363
|
+
if (this.markers.find(x => x.caption == i.toString()) == null) {
|
|
3364
|
+
caption = i.toString();
|
|
3365
|
+
break;
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
this.createMarker(top, left, caption, description);
|
|
3369
|
+
}
|
|
3370
|
+
createMarker(top, left, caption, description) {
|
|
3355
3371
|
/*
|
|
3356
3372
|
* Creo un nuovo Marker
|
|
3357
3373
|
*/
|
|
@@ -3366,28 +3382,36 @@ class TmwImageMarkerComponent {
|
|
|
3366
3382
|
originY: 'center'
|
|
3367
3383
|
});
|
|
3368
3384
|
// Creo il testo dentro al cerchio
|
|
3369
|
-
var caption = (this.markers.length + 1).toString();
|
|
3370
3385
|
var text = new fabric.Text(caption, { fontSize: 25,
|
|
3371
3386
|
originX: 'center',
|
|
3372
3387
|
originY: 'center',
|
|
3373
3388
|
fill: 'white'
|
|
3374
3389
|
});
|
|
3375
3390
|
// 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) });
|
|
3391
|
+
var group = new fabric.Group([circle, text], { left: left, top: top });
|
|
3379
3392
|
// Creo un oggetto marker che contiene gli elementi atomici. Serve per le cancellazioni e il rollback/modifica degli elementi
|
|
3380
3393
|
var marker = new Marker();
|
|
3381
3394
|
marker.circle = circle;
|
|
3382
3395
|
marker.text = text;
|
|
3383
3396
|
marker.group = group;
|
|
3384
3397
|
marker.caption = caption;
|
|
3385
|
-
marker.description =
|
|
3398
|
+
marker.description = description;
|
|
3386
3399
|
// Aggiungo il gruppo nella lista dei gruppi
|
|
3387
3400
|
this.markers.push(marker);
|
|
3401
|
+
this.markers.sort((a, b) => { return Number(a.caption) - Number(b.caption); });
|
|
3388
3402
|
// Aggiungo il gruppo all'immagine a schermo
|
|
3389
3403
|
this.canvas.add(group);
|
|
3390
3404
|
}
|
|
3405
|
+
deleteMarkerByIndex(index) {
|
|
3406
|
+
this.canvas.remove(this.markers[index].group);
|
|
3407
|
+
this.markers.splice(index, 1);
|
|
3408
|
+
}
|
|
3409
|
+
removeAllMarkers() {
|
|
3410
|
+
this.markers.forEach((marker) => {
|
|
3411
|
+
this.canvas.remove(marker.group);
|
|
3412
|
+
});
|
|
3413
|
+
this.markers = new Array();
|
|
3414
|
+
}
|
|
3391
3415
|
setUndoRedo() {
|
|
3392
3416
|
this.canUndo = this.canvas.getObjects().length > 0;
|
|
3393
3417
|
this.canRedo = this.stack.length > 0;
|
|
@@ -3472,10 +3496,18 @@ class TmwImageMarkerComponent {
|
|
|
3472
3496
|
originY: 'top'
|
|
3473
3497
|
});
|
|
3474
3498
|
});
|
|
3499
|
+
if (this.savedMarkers != null) {
|
|
3500
|
+
this.loadMarkers();
|
|
3501
|
+
}
|
|
3475
3502
|
};
|
|
3476
3503
|
}
|
|
3504
|
+
loadMarkers() {
|
|
3505
|
+
var markersObj = JSON.parse(this.savedMarkers);
|
|
3506
|
+
markersObj.forEach((marker) => {
|
|
3507
|
+
this.createMarker(marker.top, marker.left, marker.caption, marker.description);
|
|
3508
|
+
});
|
|
3509
|
+
}
|
|
3477
3510
|
saveImage() {
|
|
3478
|
-
console.log("Dati attualmente presenti", this.markers, this.canvas.getObjects());
|
|
3479
3511
|
this.outmarkers = new Array();
|
|
3480
3512
|
this.markers.forEach((marker) => {
|
|
3481
3513
|
var outmarker = new OutMarker();
|
|
@@ -3485,7 +3517,6 @@ class TmwImageMarkerComponent {
|
|
|
3485
3517
|
outmarker.left = marker.group.left;
|
|
3486
3518
|
this.outmarkers.push(outmarker);
|
|
3487
3519
|
});
|
|
3488
|
-
console.log("OUT MARKERS", this.outmarkers);
|
|
3489
3520
|
if (this.width && this.height) {
|
|
3490
3521
|
const canvasScaledElement = document.createElement('canvas');
|
|
3491
3522
|
const canvasScaled = new fabric.Canvas(canvasScaledElement);
|
|
@@ -3562,10 +3593,10 @@ class TmwImageMarkerComponent {
|
|
|
3562
3593
|
}
|
|
3563
3594
|
}
|
|
3564
3595
|
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)=\"
|
|
3596
|
+
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
3597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TmwImageMarkerComponent, decorators: [{
|
|
3567
3598
|
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)=\"
|
|
3599
|
+
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
3600
|
}], ctorParameters: function () { return []; }, propDecorators: { src: [{
|
|
3570
3601
|
type: Input
|
|
3571
3602
|
}], width: [{
|
|
@@ -3574,6 +3605,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3574
3605
|
type: Input
|
|
3575
3606
|
}], inConfig: [{
|
|
3576
3607
|
type: Input
|
|
3608
|
+
}], savedMarkers: [{
|
|
3609
|
+
type: Input
|
|
3577
3610
|
}], outputMimeType: [{
|
|
3578
3611
|
type: Input
|
|
3579
3612
|
}], outputQuality: [{
|
|
@@ -3622,6 +3655,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3622
3655
|
this.FileBase64 = "";
|
|
3623
3656
|
this.MarkFileBase64 = "";
|
|
3624
3657
|
this.FileDataBase64 = "";
|
|
3658
|
+
this.extraJSON = null;
|
|
3625
3659
|
//preLoadedImageMetadataFormGroup: UntypedFormGroup;
|
|
3626
3660
|
//#region Proprietà per configurare il componente ngx-image-Marking e aprire il relativo dialog.
|
|
3627
3661
|
this.width = null;
|
|
@@ -3648,11 +3682,11 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3648
3682
|
this.FileDataBase64 = this.record[this.field.Name].FileDataBase64;
|
|
3649
3683
|
}
|
|
3650
3684
|
this.record[this.field.Name].FileDataBase64 = this.FileDataBase64;
|
|
3685
|
+
this.extraJSON = this.record[this.field.Name].ExtraJSON;
|
|
3651
3686
|
this.imageMarkAttachment = this.record[this.field.Name];
|
|
3652
3687
|
this.imageMarkAttachment.FileDataBase64 = this.FileDataBase64;
|
|
3653
|
-
this.AttachmentID = this.
|
|
3688
|
+
this.AttachmentID = this.field.DynAttachment.ID;
|
|
3654
3689
|
}
|
|
3655
|
-
console.log("image-with-markers-field-template", this.imageWidth);
|
|
3656
3690
|
this.recordChange.emit(this.record);
|
|
3657
3691
|
// Clono l'attachment originale, gli cambio il FileBase e gli azzero l'ID
|
|
3658
3692
|
// this.imageMarkAttachment.FileName = "";
|
|
@@ -3724,6 +3758,7 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3724
3758
|
// Clono l'attachment originale, gli cambio il FileBase e gli azzero l'ID
|
|
3725
3759
|
this.imageMarkAttachment.FileDataBase64 = this.MarkFileBase64;
|
|
3726
3760
|
this.imageMarkAttachment.ExtraJSON = JSON.stringify(markedImage.outmarkers);
|
|
3761
|
+
this.extraJSON = this.imageMarkAttachment.ExtraJSON;
|
|
3727
3762
|
this.imageMark.emit(this.imageMarkAttachment);
|
|
3728
3763
|
}
|
|
3729
3764
|
if (this.dialogImageMarkingRef) {
|
|
@@ -3816,10 +3851,10 @@ class ImageWithMarkersFieldTemplateComponent {
|
|
|
3816
3851
|
}
|
|
3817
3852
|
}
|
|
3818
3853
|
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"] }] });
|
|
3854
|
+
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
3855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ImageWithMarkersFieldTemplateComponent, decorators: [{
|
|
3821
3856
|
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"] }]
|
|
3857
|
+
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
3858
|
}], ctorParameters: function () { return [{ type: i1$2.MatDialog }, { type: UtilityHelperService }]; }, propDecorators: { endPointConfiguration: [{
|
|
3824
3859
|
type: Input
|
|
3825
3860
|
}], record: [{
|
|
@@ -5320,7 +5355,6 @@ class ListViewFormRecordComponent {
|
|
|
5320
5355
|
* "onlyView" = booleano (se TRUE siamo in visualizzazione altrimenti in modifica)
|
|
5321
5356
|
*/
|
|
5322
5357
|
onAddViewEditRecord2(event) {
|
|
5323
|
-
console.log("STO QUI DENTRO!!!!!!!");
|
|
5324
5358
|
this.loader = false;
|
|
5325
5359
|
this.selectedRecord = null;
|
|
5326
5360
|
this.onlyView = event.onlyView;
|
|
@@ -9019,7 +9053,6 @@ class AddFormFieldComponent {
|
|
|
9019
9053
|
});
|
|
9020
9054
|
}
|
|
9021
9055
|
setResizedImagesHeightPx() {
|
|
9022
|
-
console.log("setResizedImagesHeightPx", this.field.ResizedImagesHeightPx);
|
|
9023
9056
|
this.resizedImagesHeightPx = this.field.ResizedImagesHeightPx;
|
|
9024
9057
|
}
|
|
9025
9058
|
deleteListImage(el, i, col) {
|
|
@@ -9392,7 +9425,6 @@ class EqpDynamicModuleConfiguratorComponent {
|
|
|
9392
9425
|
if (this.selectedField.AnswerStyle == null) {
|
|
9393
9426
|
this.selectedField.AnswerStyle = { InListView: true, VisibleIf: null, FieldstyleCSS: "", LabelstyleCSS: "", ColSpanSizes: [] };
|
|
9394
9427
|
}
|
|
9395
|
-
console.log('this.selectedField', this.selectedField);
|
|
9396
9428
|
}
|
|
9397
9429
|
else {
|
|
9398
9430
|
this.selectedField = new BaseField();
|