turbogui-angular 20.3.0 → 20.5.0
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/fesm2022/turbogui-angular.mjs +216 -57
- package/fesm2022/turbogui-angular.mjs.map +1 -1
- package/main/controller/dialog.service.d.ts +95 -13
- package/main/controller/dialog.service.d.ts.map +1 -1
- package/main/view/components/dialog-blob/dialog-blob.component.d.ts +30 -0
- package/main/view/components/dialog-blob/dialog-blob.component.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -11,13 +11,13 @@ import { CommonModule } from '@angular/common';
|
|
|
11
11
|
import { take, filter } from 'rxjs/operators';
|
|
12
12
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
13
13
|
import { ComponentPortal, DomPortalOutlet } from '@angular/cdk/portal';
|
|
14
|
-
import * as i2$1 from '@angular/
|
|
14
|
+
import * as i2$1 from '@angular/platform-browser';
|
|
15
|
+
import * as i2$2 from '@angular/material/datepicker';
|
|
15
16
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
16
17
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
17
18
|
import * as i1$1 from '@angular/material/snack-bar';
|
|
18
19
|
import * as i1$2 from '@angular/router';
|
|
19
20
|
import { NavigationEnd } from '@angular/router';
|
|
20
|
-
import * as i2$2 from '@angular/platform-browser';
|
|
21
21
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
22
22
|
import * as i4 from '@angular/material/input';
|
|
23
23
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -581,6 +581,106 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
581
581
|
args: ['@busyStateBaseFade']
|
|
582
582
|
}] } });
|
|
583
583
|
|
|
584
|
+
/**
|
|
585
|
+
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
586
|
+
*
|
|
587
|
+
* Website : -> http://www.turbogui.org
|
|
588
|
+
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
|
|
589
|
+
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
|
|
590
|
+
* CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
|
|
591
|
+
*/
|
|
592
|
+
/**
|
|
593
|
+
* A dialog component with an iframe that can be used to display any url or content.
|
|
594
|
+
*
|
|
595
|
+
* We must specify the url in the data parameter when opening the dialog, and we can also specify the title
|
|
596
|
+
* by placing it at the first position of the texts array.
|
|
597
|
+
*/
|
|
598
|
+
class DialogIFrameComponent extends DialogBaseComponent {
|
|
599
|
+
static { this.DIALOG_CLASS_NAME = 'DialogIFrameComponent'; }
|
|
600
|
+
constructor(elementRef, dialogRef, sanitizer, data) {
|
|
601
|
+
super(elementRef, dialogRef);
|
|
602
|
+
this.elementRef = elementRef;
|
|
603
|
+
this.dialogRef = dialogRef;
|
|
604
|
+
this.sanitizer = sanitizer;
|
|
605
|
+
this.data = data;
|
|
606
|
+
this.title = '';
|
|
607
|
+
if (data.texts.length > 0) {
|
|
608
|
+
this.title = data.texts[0];
|
|
609
|
+
}
|
|
610
|
+
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.data);
|
|
611
|
+
}
|
|
612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogIFrameComponent, deps: [{ token: i0.ElementRef }, { token: i1.MatDialogRef }, { token: i2$1.DomSanitizer }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DialogIFrameComponent, isStandalone: true, selector: "tg-dialog-iframe", providers: [], usesInheritance: true, ngImport: i0, template: "<h2 *ngIf=\"title !== ''\">{{title}}</h2>\r\n\r\n<iframe [src]=\"safeUrl\" title=\"title\"></iframe>", styles: [":host{display:block;width:100%;height:100%}h2{margin-top:0;margin-bottom:25px;width:82%}iframe{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
614
|
+
}
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogIFrameComponent, decorators: [{
|
|
616
|
+
type: Component,
|
|
617
|
+
args: [{ selector: 'tg-dialog-iframe', imports: [CommonModule], providers: [], template: "<h2 *ngIf=\"title !== ''\">{{title}}</h2>\r\n\r\n<iframe [src]=\"safeUrl\" title=\"title\"></iframe>", styles: [":host{display:block;width:100%;height:100%}h2{margin-top:0;margin-bottom:25px;width:82%}iframe{width:100%;height:100%}\n"] }]
|
|
618
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MatDialogRef }, { type: i2$1.DomSanitizer }, { type: undefined, decorators: [{
|
|
619
|
+
type: Inject,
|
|
620
|
+
args: [MAT_DIALOG_DATA]
|
|
621
|
+
}] }] });
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
625
|
+
*
|
|
626
|
+
* Website : -> http://www.turbogui.org
|
|
627
|
+
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
|
|
628
|
+
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
|
|
629
|
+
* CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
|
|
630
|
+
*/
|
|
631
|
+
/**
|
|
632
|
+
* A dialog component that shows a blob (pdf, image, etc) inside an iframe.
|
|
633
|
+
*
|
|
634
|
+
* We must specify the blol in the data parameter when opening the dialog, and we can also specify the title
|
|
635
|
+
* by placing it at the first position of the texts array.
|
|
636
|
+
*/
|
|
637
|
+
class DialogBlobComponent extends DialogBaseComponent {
|
|
638
|
+
static { this.DIALOG_CLASS_NAME = 'DialogBlobComponent'; }
|
|
639
|
+
constructor(elementRef, sanitizer, dialogRef, data) {
|
|
640
|
+
super(elementRef, dialogRef);
|
|
641
|
+
this.elementRef = elementRef;
|
|
642
|
+
this.sanitizer = sanitizer;
|
|
643
|
+
this.dialogRef = dialogRef;
|
|
644
|
+
this.data = data;
|
|
645
|
+
this.title = '';
|
|
646
|
+
this.mimeType = '';
|
|
647
|
+
this.objectUrl = '';
|
|
648
|
+
this.blobUrl = '';
|
|
649
|
+
if (data.texts.length > 0) {
|
|
650
|
+
this.title = data.texts[0];
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
ngOnInit() {
|
|
654
|
+
let blob = null;
|
|
655
|
+
let blobInput = this.data?.data?.blob;
|
|
656
|
+
this.mimeType = this.data?.data?.mimeType || 'application/octet-stream';
|
|
657
|
+
if (typeof blobInput === 'string') {
|
|
658
|
+
blob = new Blob([blobInput], { type: this.mimeType });
|
|
659
|
+
}
|
|
660
|
+
else if (blobInput instanceof Blob) {
|
|
661
|
+
blob = blobInput;
|
|
662
|
+
}
|
|
663
|
+
if (blob instanceof Blob) {
|
|
664
|
+
this.objectUrl = URL.createObjectURL(blob);
|
|
665
|
+
this.blobUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.objectUrl);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
ngOnDestroy() {
|
|
669
|
+
if (this.blobUrl !== '') {
|
|
670
|
+
URL.revokeObjectURL(this.objectUrl);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogBlobComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.DomSanitizer }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
674
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DialogBlobComponent, isStandalone: true, selector: "tg-dialog-blob", providers: [], usesInheritance: true, ngImport: i0, template: "<h2 *ngIf=\"title !== ''\">{{title}}</h2>\r\n\r\n<!-- For images -->\r\n<img *ngIf=\"mimeType.startsWith('image/')\" [src]=\"blobUrl\" [alt]=\"title\" />\r\n\r\n<!-- For PDFs and other types -->\r\n<iframe *ngIf=\"!mimeType.startsWith('image/')\" [src]=\"blobUrl\" [title]=\"title\"></iframe>", styles: [":host{display:block;width:100%;height:100%}h2{margin-top:0;margin-bottom:25px;width:82%}iframe,img{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
675
|
+
}
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogBlobComponent, decorators: [{
|
|
677
|
+
type: Component,
|
|
678
|
+
args: [{ selector: 'tg-dialog-blob', imports: [CommonModule], providers: [], template: "<h2 *ngIf=\"title !== ''\">{{title}}</h2>\r\n\r\n<!-- For images -->\r\n<img *ngIf=\"mimeType.startsWith('image/')\" [src]=\"blobUrl\" [alt]=\"title\" />\r\n\r\n<!-- For PDFs and other types -->\r\n<iframe *ngIf=\"!mimeType.startsWith('image/')\" [src]=\"blobUrl\" [title]=\"title\"></iframe>", styles: [":host{display:block;width:100%;height:100%}h2{margin-top:0;margin-bottom:25px;width:82%}iframe,img{width:100%;height:100%}\n"] }]
|
|
679
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i2$1.DomSanitizer }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
680
|
+
type: Inject,
|
|
681
|
+
args: [MAT_DIALOG_DATA]
|
|
682
|
+
}] }] });
|
|
683
|
+
|
|
584
684
|
/**
|
|
585
685
|
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
586
686
|
*
|
|
@@ -601,7 +701,7 @@ class DialogDateSelectionComponent extends DialogBaseComponent {
|
|
|
601
701
|
this.data = data;
|
|
602
702
|
}
|
|
603
703
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogDateSelectionComponent, deps: [{ token: i0.ElementRef }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
604
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DialogDateSelectionComponent, isStandalone: true, selector: "tg-dialog-date-selection", providers: [], usesInheritance: true, ngImport: i0, template: "<h2>{{data.texts[0]}}</h2>\r\n\r\n<mat-calendar #calendar\r\n (selectedChange)=\"closeDialog(0, $event)\">\r\n</mat-calendar>", styles: [":host{position:relative;min-height:300px}h1{margin-top:0;margin-bottom:25px;width:82%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$
|
|
704
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DialogDateSelectionComponent, isStandalone: true, selector: "tg-dialog-date-selection", providers: [], usesInheritance: true, ngImport: i0, template: "<h2>{{data.texts[0]}}</h2>\r\n\r\n<mat-calendar #calendar\r\n (selectedChange)=\"closeDialog(0, $event)\">\r\n</mat-calendar>", styles: [":host{position:relative;min-height:300px}h1{margin-top:0;margin-bottom:25px;width:82%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$2.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatNativeDateModule }] }); }
|
|
605
705
|
}
|
|
606
706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogDateSelectionComponent, decorators: [{
|
|
607
707
|
type: Component,
|
|
@@ -939,23 +1039,83 @@ class DialogService extends SingletoneStrictClass {
|
|
|
939
1039
|
});
|
|
940
1040
|
});
|
|
941
1041
|
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Show a dialog with an iframe inside it, to show external web pages or web applications.
|
|
1044
|
+
*
|
|
1045
|
+
* This method is a shortcut for addDialog() method using DialogIFrameComponent as the dialog component class
|
|
1046
|
+
*
|
|
1047
|
+
* @param properties An object containing the different visual and textual options that this dialog allows:
|
|
1048
|
+
* - url (mandatory): The url to load in the iframe
|
|
1049
|
+
* - title: The title to show at the top of the dialog
|
|
1050
|
+
* - id: see addDialog() docs
|
|
1051
|
+
* - width: see addDialog() docs
|
|
1052
|
+
* - maxWidth: see addDialog() docs
|
|
1053
|
+
* - height: see addDialog() docs
|
|
1054
|
+
* - maxHeight: see addDialog() docs
|
|
1055
|
+
* - modal: see addDialog() docs
|
|
1056
|
+
*
|
|
1057
|
+
* @returns A Promise that resolves once the user closes the dialog
|
|
1058
|
+
*/
|
|
1059
|
+
async addIFrameDialog(properties) {
|
|
1060
|
+
if (this._isEnabled) {
|
|
1061
|
+
await this.addDialog(DialogIFrameComponent, {
|
|
1062
|
+
id: properties.id ?? undefined,
|
|
1063
|
+
data: properties.url,
|
|
1064
|
+
texts: properties.title ? [properties.title] : undefined,
|
|
1065
|
+
width: properties.width ?? "98vw",
|
|
1066
|
+
maxWidth: properties.maxWidth ?? "1000px",
|
|
1067
|
+
height: properties.height ?? "98vh",
|
|
1068
|
+
maxHeight: properties.maxHeight ?? "3000px",
|
|
1069
|
+
modal: properties.modal ?? false
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
return null;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Show a dialog with a pdf from a binary blob data.
|
|
1076
|
+
*
|
|
1077
|
+
* This method is a shortcut for addDialog() method using DialogBlobComponent as the dialog component class, using the received blob
|
|
1078
|
+
* data with a mime type of 'application/pdf'
|
|
1079
|
+
*
|
|
1080
|
+
* @param properties An object containing the different visual and textual options that this dialog allows:
|
|
1081
|
+
* - blob (mandatory): The binary data containing the pdf file to show. It can be a Blob, an ArrayBuffer or a raw binary string
|
|
1082
|
+
* - title: The title to show at the top of the dialog
|
|
1083
|
+
* - id: see addDialog() docs
|
|
1084
|
+
* - width: see addDialog() docs
|
|
1085
|
+
* - maxWidth: see addDialog() docs
|
|
1086
|
+
* - height: see addDialog() docs
|
|
1087
|
+
* - maxHeight: see addDialog() docs
|
|
1088
|
+
* - modal: see addDialog() docs
|
|
1089
|
+
*
|
|
1090
|
+
* @returns A Promise that resolves once the user closes the dialog
|
|
1091
|
+
*/
|
|
1092
|
+
async addPdfDialog(properties) {
|
|
1093
|
+
if (this._isEnabled) {
|
|
1094
|
+
await this.addDialog(DialogBlobComponent, {
|
|
1095
|
+
id: properties.id ?? undefined,
|
|
1096
|
+
data: { blob: properties.blob, mimeType: 'application/pdf' },
|
|
1097
|
+
texts: properties.title ? [properties.title] : undefined,
|
|
1098
|
+
width: properties.width ?? "98vw",
|
|
1099
|
+
maxWidth: properties.maxWidth ?? "1000px",
|
|
1100
|
+
height: properties.height ?? "98vh",
|
|
1101
|
+
maxHeight: properties.maxHeight ?? "3000px",
|
|
1102
|
+
modal: properties.modal ?? false
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
return null;
|
|
1106
|
+
}
|
|
942
1107
|
/**
|
|
943
1108
|
* Show a dialog with a calendar to let the user pick a date.
|
|
944
1109
|
*
|
|
945
1110
|
* @param properties An object containing the different visual and textual options that this dialog allows:
|
|
946
|
-
* - id:
|
|
947
|
-
* - width:
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
* -
|
|
951
|
-
*
|
|
952
|
-
* -
|
|
953
|
-
* -
|
|
954
|
-
* - modal: True (default) if selecting an option is mandatory to close the dialog, false if the dialog can be closed
|
|
955
|
-
* by the user clicking outside it
|
|
956
|
-
* - title: An optional dialog title
|
|
957
|
-
* - viewContainerRef: This is important to propagate providers from a parent component to this dialog. We must specify
|
|
958
|
-
* this reference to make sure the same services injected on the parent are available too at the child dialog
|
|
1111
|
+
* - id: see addDialog() docs
|
|
1112
|
+
* - width: see addDialog() docs
|
|
1113
|
+
* - maxWidth: see addDialog() docs
|
|
1114
|
+
* - height: see addDialog() docs
|
|
1115
|
+
* - maxHeight: see addDialog() docs
|
|
1116
|
+
* - modal: see addDialog() docs
|
|
1117
|
+
* - title: The title to show at the top of the dialog
|
|
1118
|
+
* - viewContainerRef: see addDialog() docs
|
|
959
1119
|
*
|
|
960
1120
|
* @returns A Promise that resolves to a Date() object selected by the user or null if no selection was made
|
|
961
1121
|
*/
|
|
@@ -975,6 +1135,44 @@ class DialogService extends SingletoneStrictClass {
|
|
|
975
1135
|
});
|
|
976
1136
|
return selection.index === -1 ? null : selection.value;
|
|
977
1137
|
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Show a dialog with an error message and a single option button to close it.
|
|
1140
|
+
*
|
|
1141
|
+
* This method is a shortcut for addDialog() method using DialogErrorComponent as the dialog component class
|
|
1142
|
+
*
|
|
1143
|
+
* @param properties An object containing the different visual and textual options that this dialog allows:
|
|
1144
|
+
* - title (mandatory): The dialog title
|
|
1145
|
+
* - option (mandatory): The text to place on the single option button
|
|
1146
|
+
* - description: An optional description text to show below the title
|
|
1147
|
+
* - id: see addDialog() docs
|
|
1148
|
+
* - width: see addDialog() docs
|
|
1149
|
+
* - maxWidth: see addDialog() docs
|
|
1150
|
+
* - height: see addDialog() docs
|
|
1151
|
+
* - maxHeight: see addDialog() docs
|
|
1152
|
+
* - modal: see addDialog() docs
|
|
1153
|
+
* - dialogErrorComponentClass: A custom component class to use instead of the default DialogErrorComponent. This custom component must extend DialogErrorComponent
|
|
1154
|
+
*
|
|
1155
|
+
* @returns A Promise that resolves once the user selects the button with the option caption
|
|
1156
|
+
*/
|
|
1157
|
+
async addErrorDialog(properties) {
|
|
1158
|
+
if (this._isEnabled) {
|
|
1159
|
+
let texts = [properties.title];
|
|
1160
|
+
if (properties.description && properties.description !== undefined) {
|
|
1161
|
+
texts.push(properties.description);
|
|
1162
|
+
}
|
|
1163
|
+
await this.addDialog(properties.dialogErrorComponentClass ?? DialogErrorComponent, {
|
|
1164
|
+
id: properties.id ?? undefined,
|
|
1165
|
+
width: properties.width ?? "70%",
|
|
1166
|
+
maxWidth: properties.maxWidth ?? "500px",
|
|
1167
|
+
height: properties.height ?? "auto",
|
|
1168
|
+
maxHeight: properties.maxHeight ?? "92vw",
|
|
1169
|
+
modal: properties.modal ?? false,
|
|
1170
|
+
texts: texts,
|
|
1171
|
+
options: [properties.option]
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
return null;
|
|
1175
|
+
}
|
|
978
1176
|
/**
|
|
979
1177
|
* Force the removal of all the dialogs that are currently visible.
|
|
980
1178
|
*
|
|
@@ -1787,7 +1985,7 @@ class RouterBaseService {
|
|
|
1787
1985
|
// Clean up BehaviorSubject
|
|
1788
1986
|
this._currentRoute.complete();
|
|
1789
1987
|
}
|
|
1790
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouterBaseService, deps: [{ token: i1$2.Router }, { token: i2$
|
|
1988
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouterBaseService, deps: [{ token: i1$2.Router }, { token: i2$1.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1791
1989
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouterBaseService, providedIn: 'root' }); }
|
|
1792
1990
|
}
|
|
1793
1991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouterBaseService, decorators: [{
|
|
@@ -1795,7 +1993,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1795
1993
|
args: [{
|
|
1796
1994
|
providedIn: 'root',
|
|
1797
1995
|
}]
|
|
1798
|
-
}], ctorParameters: () => [{ type: i1$2.Router }, { type: i2$
|
|
1996
|
+
}], ctorParameters: () => [{ type: i1$2.Router }, { type: i2$1.Title }] });
|
|
1799
1997
|
|
|
1800
1998
|
/**
|
|
1801
1999
|
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
@@ -2314,45 +2512,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
2314
2512
|
}]
|
|
2315
2513
|
}] });
|
|
2316
2514
|
|
|
2317
|
-
/**
|
|
2318
|
-
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
2319
|
-
*
|
|
2320
|
-
* Website : -> http://www.turbogui.org
|
|
2321
|
-
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
|
|
2322
|
-
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
|
|
2323
|
-
* CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com
|
|
2324
|
-
*/
|
|
2325
|
-
/**
|
|
2326
|
-
* A dialog component with an iframe that can be used to display any url or content.
|
|
2327
|
-
*
|
|
2328
|
-
* We must specify the url in the data parameter when opening the dialog, and we can also specify the title
|
|
2329
|
-
* bi placing it at the first position of the texts array.
|
|
2330
|
-
*/
|
|
2331
|
-
class DialogIFrameComponent extends DialogBaseComponent {
|
|
2332
|
-
static { this.DIALOG_CLASS_NAME = 'DialogIFrameComponent'; }
|
|
2333
|
-
constructor(elementRef, dialogRef, sanitizer, data) {
|
|
2334
|
-
super(elementRef, dialogRef);
|
|
2335
|
-
this.elementRef = elementRef;
|
|
2336
|
-
this.dialogRef = dialogRef;
|
|
2337
|
-
this.sanitizer = sanitizer;
|
|
2338
|
-
this.data = data;
|
|
2339
|
-
this.title = '';
|
|
2340
|
-
if (data.texts.length > 0) {
|
|
2341
|
-
this.title = data.texts[0];
|
|
2342
|
-
}
|
|
2343
|
-
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.data);
|
|
2344
|
-
}
|
|
2345
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogIFrameComponent, deps: [{ token: i0.ElementRef }, { token: i1.MatDialogRef }, { token: i2$2.DomSanitizer }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2346
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: DialogIFrameComponent, isStandalone: true, selector: "tg-dialog-iframe", providers: [], usesInheritance: true, ngImport: i0, template: "<h2 *ngIf=\"title !== ''\">{{title}}</h2>\r\n\r\n<iframe [src]=\"safeUrl\" title=\"data.texts[0]\"></iframe>", styles: [":host{display:block;width:100%;height:100%}h2{margin-top:0;margin-bottom:25px;width:82%}iframe{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
2347
|
-
}
|
|
2348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DialogIFrameComponent, decorators: [{
|
|
2349
|
-
type: Component,
|
|
2350
|
-
args: [{ selector: 'tg-dialog-iframe', imports: [CommonModule], providers: [], template: "<h2 *ngIf=\"title !== ''\">{{title}}</h2>\r\n\r\n<iframe [src]=\"safeUrl\" title=\"data.texts[0]\"></iframe>", styles: [":host{display:block;width:100%;height:100%}h2{margin-top:0;margin-bottom:25px;width:82%}iframe{width:100%;height:100%}\n"] }]
|
|
2351
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MatDialogRef }, { type: i2$2.DomSanitizer }, { type: undefined, decorators: [{
|
|
2352
|
-
type: Inject,
|
|
2353
|
-
args: [MAT_DIALOG_DATA]
|
|
2354
|
-
}] }] });
|
|
2355
|
-
|
|
2356
2515
|
/**
|
|
2357
2516
|
* TurboGUI is A library that helps with the most common and generic UI elements and functionalities
|
|
2358
2517
|
*
|