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