i-tech-shared-components 1.1.30 → 1.1.32

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.
@@ -1,14 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Pipe, inject, Injectable, Directive, Input, HostListener, EventEmitter, Component, Output, ViewChild } from '@angular/core';
2
+ import { Pipe, Directive, Input, HostListener, EventEmitter, Component, Output, inject, Injectable, ViewChild, ViewContainerRef, Inject } from '@angular/core';
3
3
  import * as i2 from '@ngx-translate/core';
4
4
  import { TranslateModule, TranslatePipe, TranslateService } from '@ngx-translate/core';
5
- import * as i3 from '@angular/forms';
6
- import { NgControl, FormControlName, ReactiveFormsModule, UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
7
5
  import { MatIconButton, MatFabButton, MatButton } from '@angular/material/button';
8
- import { NgClass, NgIf, NgOptimizedImage, NgFor, NgForOf } from '@angular/common';
6
+ import * as i3$2 from '@angular/common';
7
+ import { NgClass, NgIf, NgOptimizedImage, NgFor, NgForOf, NgComponentOutlet, CommonModule } from '@angular/common';
9
8
  import { MatTooltip } from '@angular/material/tooltip';
10
9
  import * as i1 from '@angular/material/icon';
11
10
  import { MatIcon, MatIconModule } from '@angular/material/icon';
11
+ import * as i3 from '@angular/forms';
12
+ import { NgControl, FormControlName, ReactiveFormsModule, UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
12
13
  import * as i4 from '@angular/material/form-field';
13
14
  import { MatFormFieldModule, MatLabel } from '@angular/material/form-field';
14
15
  import { MatInput } from '@angular/material/input';
@@ -20,6 +21,10 @@ import * as i6 from '@angular/material/core';
20
21
  import * as i3$1 from '@angular/material/datepicker';
21
22
  import { MatDatepickerModule } from '@angular/material/datepicker';
22
23
  import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu';
24
+ import { MatChip } from '@angular/material/chips';
25
+ import * as i1$1 from '@angular/material/dialog';
26
+ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
27
+ import { NoopScrollStrategy } from '@angular/cdk/overlay';
23
28
 
24
29
  class GenerateErrorMessagesPipe {
25
30
  constructor(translateService) {
@@ -105,38 +110,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
105
110
  }]
106
111
  }] });
107
112
 
108
- class NoopValueAccessor {
109
- writeValue() {
110
- // No-op: Intentionally empty to prevent value updates
111
- }
112
- registerOnChange() {
113
- // No-op: Intentionally empty to prevent change notifications
114
- }
115
- registerOnTouched() {
116
- // No-op: Intentionally empty to prevent touch notifications
117
- }
118
- }
119
- class InputService {
120
- injectNgControl() {
121
- const ngControl = inject(NgControl, { self: true, optional: true });
122
- if (!ngControl)
123
- throw new Error('...');
124
- if (ngControl instanceof FormControlName) {
125
- ngControl.valueAccessor = new NoopValueAccessor();
126
- return ngControl;
127
- }
128
- throw new Error(`...`);
129
- }
130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: InputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
131
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: InputService, providedIn: 'root' }); }
132
- }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: InputService, decorators: [{
134
- type: Injectable,
135
- args: [{
136
- providedIn: 'root'
137
- }]
138
- }] });
139
-
140
113
  /**
141
114
  * Enum representing different types of buttons.
142
115
  */
@@ -154,6 +127,41 @@ var ButtonType;
154
127
  ButtonType["WARNING"] = "WARNING";
155
128
  })(ButtonType || (ButtonType = {}));
156
129
 
130
+ var ConfirmationDialogTypesEnum;
131
+ (function (ConfirmationDialogTypesEnum) {
132
+ ConfirmationDialogTypesEnum["WARNING"] = "WARNING";
133
+ ConfirmationDialogTypesEnum["CONFIRMATION"] = "CONFIRMATION";
134
+ })(ConfirmationDialogTypesEnum || (ConfirmationDialogTypesEnum = {}));
135
+
136
+ var DropdownSelectionType;
137
+ (function (DropdownSelectionType) {
138
+ DropdownSelectionType["UPLOAD"] = "UPLOAD";
139
+ DropdownSelectionType["DOWNLOAD"] = "DOWNLOAD";
140
+ DropdownSelectionType["BLANK"] = "BLANK";
141
+ })(DropdownSelectionType || (DropdownSelectionType = {}));
142
+ const DropdownItemIcon = {
143
+ [DropdownSelectionType.UPLOAD]: 'upload',
144
+ [DropdownSelectionType.DOWNLOAD]: 'download',
145
+ [DropdownSelectionType.BLANK]: 'blank',
146
+ };
147
+
148
+ var LabelTypeEnum;
149
+ (function (LabelTypeEnum) {
150
+ LabelTypeEnum["purple"] = "purple";
151
+ LabelTypeEnum["teal"] = "teal";
152
+ LabelTypeEnum["olive"] = "olive";
153
+ LabelTypeEnum["orange"] = "orange";
154
+ LabelTypeEnum["blue"] = "blue";
155
+ LabelTypeEnum["cyan"] = "cyan";
156
+ LabelTypeEnum["raspberry"] = "raspberry";
157
+ LabelTypeEnum["yellow"] = "yellow";
158
+ LabelTypeEnum["wine"] = "wine";
159
+ LabelTypeEnum["primary"] = "primary";
160
+ LabelTypeEnum["green"] = "green";
161
+ LabelTypeEnum["red"] = "red";
162
+ LabelTypeEnum["gray"] = "gray";
163
+ })(LabelTypeEnum || (LabelTypeEnum = {}));
164
+
157
165
  class InputMaskDirective {
158
166
  set min(value) {
159
167
  this.minimumValue = Number(value);
@@ -288,6 +296,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
288
296
  type: Output
289
297
  }] } });
290
298
 
299
+ class NoopValueAccessor {
300
+ writeValue() {
301
+ // No-op: Intentionally empty to prevent value updates
302
+ }
303
+ registerOnChange() {
304
+ // No-op: Intentionally empty to prevent change notifications
305
+ }
306
+ registerOnTouched() {
307
+ // No-op: Intentionally empty to prevent touch notifications
308
+ }
309
+ }
310
+ class InputService {
311
+ injectNgControl() {
312
+ const ngControl = inject(NgControl, { self: true, optional: true });
313
+ if (!ngControl)
314
+ throw new Error('...');
315
+ if (ngControl instanceof FormControlName) {
316
+ ngControl.valueAccessor = new NoopValueAccessor();
317
+ return ngControl;
318
+ }
319
+ throw new Error(`...`);
320
+ }
321
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: InputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
322
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: InputService, providedIn: 'root' }); }
323
+ }
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: InputService, decorators: [{
325
+ type: Injectable,
326
+ args: [{
327
+ providedIn: 'root'
328
+ }]
329
+ }] });
330
+
291
331
  class TextInputComponent {
292
332
  set inputData(data) {
293
333
  // If submit becomes true, mark the control as touched
@@ -1184,18 +1224,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
1184
1224
  args: ['min']
1185
1225
  }] } });
1186
1226
 
1187
- var DropdownSelectionType;
1188
- (function (DropdownSelectionType) {
1189
- DropdownSelectionType["UPLOAD"] = "UPLOAD";
1190
- DropdownSelectionType["DOWNLOAD"] = "DOWNLOAD";
1191
- DropdownSelectionType["BLANK"] = "BLANK";
1192
- })(DropdownSelectionType || (DropdownSelectionType = {}));
1193
- const DropdownItemIcon = {
1194
- [DropdownSelectionType.UPLOAD]: 'upload',
1195
- [DropdownSelectionType.DOWNLOAD]: 'download',
1196
- [DropdownSelectionType.BLANK]: 'blank',
1197
- };
1198
-
1199
1227
  class MenuComponent {
1200
1228
  constructor() {
1201
1229
  this.positionX = 'before';
@@ -1236,13 +1264,257 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
1236
1264
  type: Output
1237
1265
  }] } });
1238
1266
 
1267
+ class LabelComponent {
1268
+ constructor() {
1269
+ this.color = LabelTypeEnum.primary;
1270
+ this.bordered = false;
1271
+ this.size = 'standard';
1272
+ this.iconSvg = '';
1273
+ this.disableRipple = false;
1274
+ this.forTable = false;
1275
+ }
1276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1277
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.2", type: LabelComponent, isStandalone: true, selector: "i-tech-label", inputs: { color: "color", text: "text", bordered: "bordered", tooltip: "tooltip", size: "size", iconName: "iconName", iconSvg: "iconSvg", disableRipple: "disableRipple", forTable: "forTable", innerHtml: "innerHtml" }, ngImport: i0, template: "<div [class]=\"{table_row_item: forTable,'trailing-icon' : iconName || iconSvg}\">\r\n\r\n <mat-chip\r\n [class]=\"'label_' + color\"\r\n [ngClass]=\"{bordered: bordered, small: size === 'small'}\"\r\n [matTooltip]=\"(tooltip || '') | translate\"\r\n [disableRipple]=\"disableRipple\"\r\n >\r\n <div class=\"flex_align_center flex_gap\">\r\n <span *ngIf=\"!innerHtml\">{{text | translate}}</span>\r\n <span *ngIf=\"innerHtml\" [innerHtml]=\"innerHtml | translate\"></span>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n </div>\r\n </mat-chip>\r\n</div>\r\n", dependencies: [{ kind: "component", type: MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
1278
+ }
1279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: LabelComponent, decorators: [{
1280
+ type: Component,
1281
+ args: [{ selector: 'i-tech-label', imports: [
1282
+ MatChip,
1283
+ MatTooltip,
1284
+ NgClass,
1285
+ TranslateModule,
1286
+ MatIcon
1287
+ ], template: "<div [class]=\"{table_row_item: forTable,'trailing-icon' : iconName || iconSvg}\">\r\n\r\n <mat-chip\r\n [class]=\"'label_' + color\"\r\n [ngClass]=\"{bordered: bordered, small: size === 'small'}\"\r\n [matTooltip]=\"(tooltip || '') | translate\"\r\n [disableRipple]=\"disableRipple\"\r\n >\r\n <div class=\"flex_align_center flex_gap\">\r\n <span *ngIf=\"!innerHtml\">{{text | translate}}</span>\r\n <span *ngIf=\"innerHtml\" [innerHtml]=\"innerHtml | translate\"></span>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n </div>\r\n </mat-chip>\r\n</div>\r\n" }]
1288
+ }], propDecorators: { color: [{
1289
+ type: Input
1290
+ }], text: [{
1291
+ type: Input
1292
+ }], bordered: [{
1293
+ type: Input
1294
+ }], tooltip: [{
1295
+ type: Input
1296
+ }], size: [{
1297
+ type: Input
1298
+ }], iconName: [{
1299
+ type: Input
1300
+ }], iconSvg: [{
1301
+ type: Input
1302
+ }], disableRipple: [{
1303
+ type: Input
1304
+ }], forTable: [{
1305
+ type: Input
1306
+ }], innerHtml: [{
1307
+ type: Input
1308
+ }] } });
1309
+
1310
+ class LoadingComponent {
1311
+ constructor() {
1312
+ this.loading = false;
1313
+ this.absolute = false;
1314
+ this.smallLoading = false;
1315
+ }
1316
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1317
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.2", type: LoadingComponent, isStandalone: true, selector: "i-tech-loading", inputs: { loading: "loading", absolute: "absolute", smallLoading: "smallLoading" }, ngImport: i0, template: "<div [hidden]=\"!loading\" class=\"big_loading\" [ngClass]=\"{absolute: absolute, small_loading: smallLoading}\">\r\n <img alt=\"\" src=\"assets/images/table-loader.svg\" />\r\n</div>\r\n", styles: [".big_loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999}.big_loading img{width:100px;height:100px}.small_loading img{width:40px;height:40px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1318
+ }
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: LoadingComponent, decorators: [{
1320
+ type: Component,
1321
+ args: [{ selector: 'i-tech-loading', imports: [
1322
+ NgClass
1323
+ ], template: "<div [hidden]=\"!loading\" class=\"big_loading\" [ngClass]=\"{absolute: absolute, small_loading: smallLoading}\">\r\n <img alt=\"\" src=\"assets/images/table-loader.svg\" />\r\n</div>\r\n", styles: [".big_loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999}.big_loading img{width:100px;height:100px}.small_loading img{width:40px;height:40px}\n"] }]
1324
+ }], propDecorators: { loading: [{
1325
+ type: Input
1326
+ }], absolute: [{
1327
+ type: Input
1328
+ }], smallLoading: [{
1329
+ type: Input
1330
+ }] } });
1331
+
1332
+ class StandardDialogComponent {
1333
+ constructor(data, componentFactoryResolver, dialogRef) {
1334
+ this.data = data;
1335
+ this.componentFactoryResolver = componentFactoryResolver;
1336
+ this.dialogRef = dialogRef;
1337
+ this.loading = true;
1338
+ this.pending = false;
1339
+ this.ButtonType = ButtonType;
1340
+ }
1341
+ ngAfterViewInit() {
1342
+ setTimeout(() => {
1343
+ if (!this.data.component) {
1344
+ return;
1345
+ }
1346
+ this.component = this.componentContainer?.createComponent(this.componentFactoryResolver.resolveComponentFactory(this.data.component));
1347
+ if (this.component) {
1348
+ if (this.data.configs?.data) {
1349
+ this.component.instance.ready?.subscribe(() => {
1350
+ setTimeout(() => this.loading = false, 300);
1351
+ });
1352
+ }
1353
+ else {
1354
+ setTimeout(() => this.loading = false, 300);
1355
+ }
1356
+ this.component.instance.data = this.data.configs?.data;
1357
+ this.component.instance.closeModal.subscribe((data) => {
1358
+ this.dialogRef.close(data);
1359
+ });
1360
+ this.component.instance.loading?.subscribe((start) => {
1361
+ this.pending = start;
1362
+ });
1363
+ this.component.instance.disable?.subscribe((disabled) => {
1364
+ if (this.data.configs?.button) {
1365
+ this.data.configs.button.disabled = disabled;
1366
+ }
1367
+ });
1368
+ }
1369
+ }, 10);
1370
+ }
1371
+ save(type = '') {
1372
+ if (type === 'close') {
1373
+ this.dialogRef.close(true);
1374
+ }
1375
+ else if (this.component) {
1376
+ if (this.pending) {
1377
+ return;
1378
+ }
1379
+ this.component.instance.save();
1380
+ }
1381
+ else {
1382
+ this.dialogRef.close(true);
1383
+ }
1384
+ }
1385
+ close() {
1386
+ this.dialogRef.close(null);
1387
+ }
1388
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: StandardDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i0.ComponentFactoryResolver }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
1389
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.2", type: StandardDialogComponent, isStandalone: true, selector: "i-tech-standard-dialog", viewQueries: [{ propertyName: "componentContainer", first: true, predicate: ["component"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"modal_content standard_dialog flex_between\" *ngIf=\"data\" [ngClass]=\"{visibility_hidden: loading}\">\r\n <div class=\"modal-title-text base-bold\" *ngIf=\"data.configs?.title\">\r\n {{(data.configs?.title || '') | translate}}\r\n </div>\r\n <div *ngIf=\"data.configs?.description\" class=\"modal-body-text mt-16\">\r\n {{(data.configs?.description || '') | translate}}\r\n </div>\r\n\r\n <div class=\"modal_content--content\"\r\n [ngClass]=\"data?.configs?.marginTop === false || !data.configs?.title ? '' : 'mt-20 mb-standard-dialog'\"\r\n >\r\n <ng-container #component></ng-container>\r\n </div>\r\n <div class=\"ml-auto flex_align_center\" [ngClass]=\"data.configs?.actionsMarginTop || ''\">\r\n <i-tech-button\r\n *ngIf=\"!data.configs?.cancelButton?.hidden\"\r\n (click)=\"close()\"\r\n [customClass]=\"'mr-20'\"\r\n [type]=\"ButtonType.TONAL\"\r\n [text]=\"data.configs?.cancelButton?.text || 'Cancel'\"\r\n ></i-tech-button>\r\n <i-tech-button\r\n *ngIf=\"!data.configs?.button?.hidden\"\r\n [customClass]=\"(data.configs?.button?.class || '') + ' ' + (data.configs?.button?.disabled ? ' disabled' : '')\"\r\n [disabled]=\"data.configs?.button?.disabled || false\"\r\n [submit]=\"pending\"\r\n [type]=\"data.configs?.button?.buttonType || ButtonType.FILLED\"\r\n (click)=\"save(data.configs?.button?.type)\"\r\n [text]=\"(data.configs?.button?.text || 'Save')\"\r\n ></i-tech-button>\r\n </div>\r\n</div>\r\n<i-tech-loading [loading]=\"loading\" ></i-tech-loading>\r\n", styles: [".modal_content{position:relative}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: LoadingComponent, selector: "i-tech-loading", inputs: ["loading", "absolute", "smallLoading"] }, { kind: "component", type: ButtonComponent, selector: "i-tech-button", inputs: ["text", "data_cy", "fontIcon", "svgIcon", "type", "customClass", "submit", "disabled", "activated", "color"], outputs: ["buttonClick"] }] }); }
1390
+ }
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: StandardDialogComponent, decorators: [{
1392
+ type: Component,
1393
+ args: [{ selector: 'i-tech-standard-dialog', imports: [
1394
+ NgClass,
1395
+ NgIf,
1396
+ TranslateModule,
1397
+ LoadingComponent,
1398
+ ButtonComponent,
1399
+ ], template: "<div class=\"modal_content standard_dialog flex_between\" *ngIf=\"data\" [ngClass]=\"{visibility_hidden: loading}\">\r\n <div class=\"modal-title-text base-bold\" *ngIf=\"data.configs?.title\">\r\n {{(data.configs?.title || '') | translate}}\r\n </div>\r\n <div *ngIf=\"data.configs?.description\" class=\"modal-body-text mt-16\">\r\n {{(data.configs?.description || '') | translate}}\r\n </div>\r\n\r\n <div class=\"modal_content--content\"\r\n [ngClass]=\"data?.configs?.marginTop === false || !data.configs?.title ? '' : 'mt-20 mb-standard-dialog'\"\r\n >\r\n <ng-container #component></ng-container>\r\n </div>\r\n <div class=\"ml-auto flex_align_center\" [ngClass]=\"data.configs?.actionsMarginTop || ''\">\r\n <i-tech-button\r\n *ngIf=\"!data.configs?.cancelButton?.hidden\"\r\n (click)=\"close()\"\r\n [customClass]=\"'mr-20'\"\r\n [type]=\"ButtonType.TONAL\"\r\n [text]=\"data.configs?.cancelButton?.text || 'Cancel'\"\r\n ></i-tech-button>\r\n <i-tech-button\r\n *ngIf=\"!data.configs?.button?.hidden\"\r\n [customClass]=\"(data.configs?.button?.class || '') + ' ' + (data.configs?.button?.disabled ? ' disabled' : '')\"\r\n [disabled]=\"data.configs?.button?.disabled || false\"\r\n [submit]=\"pending\"\r\n [type]=\"data.configs?.button?.buttonType || ButtonType.FILLED\"\r\n (click)=\"save(data.configs?.button?.type)\"\r\n [text]=\"(data.configs?.button?.text || 'Save')\"\r\n ></i-tech-button>\r\n </div>\r\n</div>\r\n<i-tech-loading [loading]=\"loading\" ></i-tech-loading>\r\n", styles: [".modal_content{position:relative}\n"] }]
1400
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1401
+ type: Inject,
1402
+ args: [MAT_DIALOG_DATA]
1403
+ }] }, { type: i0.ComponentFactoryResolver }, { type: i1$1.MatDialogRef }], propDecorators: { componentContainer: [{
1404
+ type: ViewChild,
1405
+ args: ['component', { read: ViewContainerRef }]
1406
+ }] } });
1407
+
1408
+ // Services
1409
+ class CustomDialogComponent {
1410
+ constructor(data) {
1411
+ this.data = data;
1412
+ }
1413
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: CustomDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
1414
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.2", type: CustomDialogComponent, isStandalone: true, selector: "i-tech-custom-dialog", ngImport: i0, template: "<div class=\"modal_content flex_between\">\r\n <div class=\"modal_content--content\">\r\n <ng-template [ngComponentOutlet]=\"data.component\"></ng-template>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] }); }
1415
+ }
1416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: CustomDialogComponent, decorators: [{
1417
+ type: Component,
1418
+ args: [{ selector: 'i-tech-custom-dialog', imports: [
1419
+ NgComponentOutlet
1420
+ ], template: "<div class=\"modal_content flex_between\">\r\n <div class=\"modal_content--content\">\r\n <ng-template [ngComponentOutlet]=\"data.component\"></ng-template>\r\n </div>\r\n</div>\r\n" }]
1421
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1422
+ type: Inject,
1423
+ args: [MAT_DIALOG_DATA]
1424
+ }] }] });
1425
+
1426
+ class ConfirmationDialogByTypeComponent {
1427
+ constructor(data, dialogRef) {
1428
+ this.data = data;
1429
+ this.dialogRef = dialogRef;
1430
+ this.ConfirmationDialogTypesEnum = ConfirmationDialogTypesEnum;
1431
+ this.ButtonType = ButtonType;
1432
+ this.loading = false;
1433
+ if (data.subject) {
1434
+ data.subject.subscribe(res => {
1435
+ if (res.type === 'close') {
1436
+ this.dialogRef.close(1);
1437
+ }
1438
+ });
1439
+ }
1440
+ }
1441
+ confirm() {
1442
+ if (this.data.subject) {
1443
+ this.loading = true;
1444
+ this.data.subject.next({ type: 'access' });
1445
+ return;
1446
+ }
1447
+ this.dialogRef.close(1);
1448
+ }
1449
+ dismiss() {
1450
+ this.dialogRef.close(0);
1451
+ }
1452
+ ngOnDestroy() {
1453
+ this.data.subject?.unsubscribe();
1454
+ }
1455
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: ConfirmationDialogByTypeComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
1456
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.2", type: ConfirmationDialogByTypeComponent, isStandalone: true, selector: "i-tech-confirmation-dialog-by-type", ngImport: i0, template: "<div class=\"modal_content flex_between\" *ngIf=\"data\">\r\n <div class=\"modal-title-text base-bold\">\r\n {{(data?.modalTitle || data.type) | translate}}\r\n </div>\r\n <div class=\"modal-body-text mt-20\" *ngIf=\"!data.descriptionByHtml\" [ngClass]=\"{unset_max_width: data.unsetMaxWidth}\">\r\n {{(data.description || '') | translate }}\r\n </div>\r\n\r\n <div class=\"modal-body-text mt-20\" *ngIf=\"data.descriptionByHtml\"\r\n [innerHTML]=\"data.description\"\r\n [ngClass]=\"{unset_max_width: data.unsetMaxWidth}\"\r\n >\r\n </div>\r\n\r\n <div class=\"mt-50 flex_end flex_align_center\">\r\n <i-tech-button\r\n [type]=\"ButtonType.TONAL\"\r\n [customClass]=\"'mr-20'\"\r\n (click)=\"dismiss()\"\r\n [text]=\"(data.cancelText || 'cancel._')\"\r\n ></i-tech-button>\r\n <i-tech-button\r\n (click)=\"confirm()\"\r\n [color]=\"data.type === ConfirmationDialogTypesEnum.CONFIRMATION ? 'primary' : 'warn'\"\r\n [text]=\"(data.confirmText || 'yes')\"\r\n ></i-tech-button>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: ButtonComponent, selector: "i-tech-button", inputs: ["text", "data_cy", "fontIcon", "svgIcon", "type", "customClass", "submit", "disabled", "activated", "color"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1457
+ }
1458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: ConfirmationDialogByTypeComponent, decorators: [{
1459
+ type: Component,
1460
+ args: [{ selector: 'i-tech-confirmation-dialog-by-type', imports: [
1461
+ TranslateModule,
1462
+ ButtonComponent,
1463
+ CommonModule
1464
+ ], template: "<div class=\"modal_content flex_between\" *ngIf=\"data\">\r\n <div class=\"modal-title-text base-bold\">\r\n {{(data?.modalTitle || data.type) | translate}}\r\n </div>\r\n <div class=\"modal-body-text mt-20\" *ngIf=\"!data.descriptionByHtml\" [ngClass]=\"{unset_max_width: data.unsetMaxWidth}\">\r\n {{(data.description || '') | translate }}\r\n </div>\r\n\r\n <div class=\"modal-body-text mt-20\" *ngIf=\"data.descriptionByHtml\"\r\n [innerHTML]=\"data.description\"\r\n [ngClass]=\"{unset_max_width: data.unsetMaxWidth}\"\r\n >\r\n </div>\r\n\r\n <div class=\"mt-50 flex_end flex_align_center\">\r\n <i-tech-button\r\n [type]=\"ButtonType.TONAL\"\r\n [customClass]=\"'mr-20'\"\r\n (click)=\"dismiss()\"\r\n [text]=\"(data.cancelText || 'cancel._')\"\r\n ></i-tech-button>\r\n <i-tech-button\r\n (click)=\"confirm()\"\r\n [color]=\"data.type === ConfirmationDialogTypesEnum.CONFIRMATION ? 'primary' : 'warn'\"\r\n [text]=\"(data.confirmText || 'yes')\"\r\n ></i-tech-button>\r\n </div>\r\n</div>\r\n" }]
1465
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1466
+ type: Inject,
1467
+ args: [MAT_DIALOG_DATA]
1468
+ }] }, { type: i1$1.MatDialogRef }] });
1469
+
1470
+ class DialogService {
1471
+ constructor(dialogService) {
1472
+ this.dialogService = dialogService;
1473
+ }
1474
+ openStandardDialog(component = null, styleConfigs, data = null) {
1475
+ styleConfigs.maxHeight = '90vh';
1476
+ if (!styleConfigs.maxWidth) {
1477
+ styleConfigs.maxWidth = '90vw';
1478
+ }
1479
+ return this.dialogService.open(StandardDialogComponent, {
1480
+ ...styleConfigs,
1481
+ data: { configs: data, component },
1482
+ scrollStrategy: new NoopScrollStrategy(),
1483
+ });
1484
+ }
1485
+ openCustomDialog(component, styleConfigs = {}, data = null) {
1486
+ styleConfigs.maxWidth = '95vw';
1487
+ return this.dialogService.open(CustomDialogComponent, {
1488
+ ...styleConfigs,
1489
+ data: { configs: data, component },
1490
+ scrollStrategy: new NoopScrollStrategy()
1491
+ });
1492
+ }
1493
+ openConfirmationDialogByType(type, styleConfigs, data) {
1494
+ return this.dialogService.open(ConfirmationDialogByTypeComponent, {
1495
+ ...styleConfigs,
1496
+ data: { ...data, type },
1497
+ scrollStrategy: new NoopScrollStrategy(),
1498
+ });
1499
+ }
1500
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: DialogService, deps: [{ token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
1501
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: DialogService, providedIn: 'root' }); }
1502
+ }
1503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: DialogService, decorators: [{
1504
+ type: Injectable,
1505
+ args: [{
1506
+ providedIn: 'root'
1507
+ }]
1508
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }] });
1509
+
1239
1510
  /*
1240
1511
  * Public API Surface of shared-components
1241
1512
  */
1513
+ // Pipes
1242
1514
 
1243
1515
  /**
1244
1516
  * Generated bundle index. Do not edit.
1245
1517
  */
1246
1518
 
1247
- export { ArrayToStringPipe, AutocompleteSelectComponent, ButtonComponent, ButtonType, ClearValueComponent, DatePickerComponent, DateRangeDatepickerComponent, GenerateErrorMessagesPipe, GetValueByKeyFromObjectPipe, IconButtonComponent, InputMaskDirective, InputService, MenuComponent, TextInputComponent };
1519
+ export { ArrayToStringPipe, AutocompleteSelectComponent, ButtonComponent, ButtonType, ClearValueComponent, ConfirmationDialogByTypeComponent, ConfirmationDialogTypesEnum, CustomDialogComponent, DatePickerComponent, DateRangeDatepickerComponent, DialogService, DropdownItemIcon, DropdownSelectionType, GenerateErrorMessagesPipe, GetValueByKeyFromObjectPipe, IconButtonComponent, InputMaskDirective, InputService, LabelComponent, LabelTypeEnum, LoadingComponent, MenuComponent, StandardDialogComponent, TextInputComponent };
1248
1520
  //# sourceMappingURL=i-tech-shared-components.mjs.map