@gravitee/ui-particles-angular 7.50.0-improve-dialogs-a42aaca → 7.50.0-improve-dialogs-ec63814
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/gio-confirm-and-validate-dialog/gio-confirm-and-validate-dialog.component.mjs +20 -10
- package/esm2020/lib/gio-confirm-dialog/gio-confirm-dialog.component.mjs +20 -8
- package/fesm2015/gravitee-ui-particles-angular.mjs +36 -15
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +36 -15
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-confirm-and-validate-dialog/gio-confirm-and-validate-dialog.component.d.ts +10 -4
- package/lib/gio-confirm-dialog/gio-confirm-dialog.component.d.ts +10 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i3$1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, SecurityContext, APP_ID, Component, Inject, Input, NgModule, EventEmitter, HostBinding, Output, HostListener, ChangeDetectionStrategy, Optional, Self, ViewChild, Directive, forwardRef, ContentChildren, Host, ContentChild, InjectionToken, Pipe, ViewEncapsulation } from '@angular/core';
|
|
4
|
+
import { Injectable, SecurityContext, APP_ID, Component, Inject, Input, NgModule, EventEmitter, HostBinding, Output, HostListener, ChangeDetectionStrategy, Optional, Self, ViewChild, Directive, Injector, forwardRef, ContentChildren, Host, ContentChild, InjectionToken, Pipe, ViewEncapsulation } from '@angular/core';
|
|
5
5
|
import { shareReplay, switchMap, catchError, takeUntil, tap, startWith, map, distinctUntilChanged, filter, take, delay, debounceTime, debounce } from 'rxjs/operators';
|
|
6
6
|
import { Observable, of, ReplaySubject, Subject, forkJoin, timer, fromEvent, merge, BehaviorSubject } from 'rxjs';
|
|
7
7
|
import * as i3 from '@angular/platform-browser';
|
|
@@ -15,7 +15,7 @@ import { ComponentHarness, HarnessPredicate, parallel, TestKey } from '@angular/
|
|
|
15
15
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
16
16
|
import * as i3$3 from '@angular/material/form-field';
|
|
17
17
|
import { MatFormFieldControl, MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
18
|
-
import { isEmpty, toLower, dropRight, isNil, isArray, remove,
|
|
18
|
+
import { isEmpty, isString, isObject, toLower, dropRight, isNil, isArray, remove, cloneDeep, uniqueId, set, range } from 'lodash';
|
|
19
19
|
import * as i7 from '@angular/forms';
|
|
20
20
|
import { FormsModule, FormArray, FormGroup, FormControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
21
21
|
import * as i1$2 from '@angular/cdk/a11y';
|
|
@@ -1210,23 +1210,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1210
1210
|
* limitations under the License.
|
|
1211
1211
|
*/
|
|
1212
1212
|
class GioConfirmDialogComponent {
|
|
1213
|
-
constructor(dialogRef, confirmDialogData) {
|
|
1213
|
+
constructor(dialogRef, confirmDialogData, parentInjector) {
|
|
1214
1214
|
this.dialogRef = dialogRef;
|
|
1215
|
+
this.parentInjector = parentInjector;
|
|
1215
1216
|
this.title = confirmDialogData?.title ?? 'Are you sure?';
|
|
1216
|
-
|
|
1217
|
+
if (isString(confirmDialogData?.content)) {
|
|
1218
|
+
this.content = confirmDialogData?.content;
|
|
1219
|
+
}
|
|
1220
|
+
else if (isObject(confirmDialogData?.content)) {
|
|
1221
|
+
this.contentComponentOutlet = confirmDialogData?.content.componentOutlet;
|
|
1222
|
+
// TODO: When Angular 16 ready use ngComponentOutletInputs
|
|
1223
|
+
this.contentComponentInjector = Injector.create({
|
|
1224
|
+
providers: [{ provide: 'contentComponentInputs', useValue: confirmDialogData?.content.componentInputs }],
|
|
1225
|
+
parent: parentInjector,
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1217
1228
|
this.confirmButton = confirmDialogData?.confirmButton ?? 'Confirm';
|
|
1218
1229
|
this.cancelButton = confirmDialogData?.cancelButton ?? 'Cancel';
|
|
1219
1230
|
}
|
|
1220
1231
|
}
|
|
1221
|
-
GioConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioConfirmDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1222
|
-
GioConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioConfirmDialogComponent, selector: "gio-confirm-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content *ngIf=\"content\" class=\"confirm-dialog__content\">\n <p [innerHTML]=\"content\"></p>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\" class=\"confirm-dialog__actions\">\n <button class=\"confirm-dialog__cancel-button\" mat-flat-button [mat-dialog-close]=\"false\">\n {{ cancelButton }}\n </button>\n <button\n class=\"confirm-dialog__confirm-button\"\n color=\"warn\"\n mat-raised-button\n [mat-dialog-close]=\"true\"\n cdkFocusInitial\n data-testid=\"confirm-dialog\"\n >\n {{ confirmButton }}\n </button>\n</mat-dialog-actions>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.confirm-dialog__content{color:#606274}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
1232
|
+
GioConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioConfirmDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1233
|
+
GioConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioConfirmDialogComponent, selector: "gio-confirm-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content *ngIf=\"content\" class=\"confirm-dialog__content\">\n <p [innerHTML]=\"content\"></p>\n</mat-dialog-content>\n\n<mat-dialog-content *ngIf=\"contentComponentOutlet && !contentComponentInjector\" class=\"confirm-dialog__content\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet\"></ng-container>\n</mat-dialog-content>\n\n<mat-dialog-content *ngIf=\"contentComponentOutlet && contentComponentInjector\" class=\"confirm-dialog__content\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet; injector: contentComponentInjector\"></ng-container>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\" class=\"confirm-dialog__actions\">\n <button class=\"confirm-dialog__cancel-button\" mat-flat-button [mat-dialog-close]=\"false\">\n {{ cancelButton }}\n </button>\n <button\n class=\"confirm-dialog__confirm-button\"\n color=\"warn\"\n mat-raised-button\n [mat-dialog-close]=\"true\"\n cdkFocusInitial\n data-testid=\"confirm-dialog\"\n >\n {{ confirmButton }}\n </button>\n</mat-dialog-actions>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.confirm-dialog__content{color:#606274}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
1223
1234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioConfirmDialogComponent, decorators: [{
|
|
1224
1235
|
type: Component,
|
|
1225
|
-
args: [{ selector: 'gio-confirm-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content *ngIf=\"content\" class=\"confirm-dialog__content\">\n <p [innerHTML]=\"content\"></p>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\" class=\"confirm-dialog__actions\">\n <button class=\"confirm-dialog__cancel-button\" mat-flat-button [mat-dialog-close]=\"false\">\n {{ cancelButton }}\n </button>\n <button\n class=\"confirm-dialog__confirm-button\"\n color=\"warn\"\n mat-raised-button\n [mat-dialog-close]=\"true\"\n cdkFocusInitial\n data-testid=\"confirm-dialog\"\n >\n {{ confirmButton }}\n </button>\n</mat-dialog-actions>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.confirm-dialog__content{color:#606274}\n"] }]
|
|
1236
|
+
args: [{ selector: 'gio-confirm-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content *ngIf=\"content\" class=\"confirm-dialog__content\">\n <p [innerHTML]=\"content\"></p>\n</mat-dialog-content>\n\n<mat-dialog-content *ngIf=\"contentComponentOutlet && !contentComponentInjector\" class=\"confirm-dialog__content\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet\"></ng-container>\n</mat-dialog-content>\n\n<mat-dialog-content *ngIf=\"contentComponentOutlet && contentComponentInjector\" class=\"confirm-dialog__content\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet; injector: contentComponentInjector\"></ng-container>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\" class=\"confirm-dialog__actions\">\n <button class=\"confirm-dialog__cancel-button\" mat-flat-button [mat-dialog-close]=\"false\">\n {{ cancelButton }}\n </button>\n <button\n class=\"confirm-dialog__confirm-button\"\n color=\"warn\"\n mat-raised-button\n [mat-dialog-close]=\"true\"\n cdkFocusInitial\n data-testid=\"confirm-dialog\"\n >\n {{ confirmButton }}\n </button>\n</mat-dialog-actions>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.confirm-dialog__content{color:#606274}\n"] }]
|
|
1226
1237
|
}], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
1227
1238
|
type: Inject,
|
|
1228
1239
|
args: [MAT_DIALOG_DATA]
|
|
1229
|
-
}] }]; } });
|
|
1240
|
+
}] }, { type: i0.Injector }]; } });
|
|
1230
1241
|
|
|
1231
1242
|
/*
|
|
1232
1243
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -1305,13 +1316,23 @@ GioConfirmDialogHarness.hostSelector = 'gio-confirm-dialog';
|
|
|
1305
1316
|
* limitations under the License.
|
|
1306
1317
|
*/
|
|
1307
1318
|
class GioConfirmAndValidateDialogComponent {
|
|
1308
|
-
constructor(dialogRef, confirmDialogData) {
|
|
1319
|
+
constructor(dialogRef, confirmDialogData, parentInjector) {
|
|
1309
1320
|
this.dialogRef = dialogRef;
|
|
1321
|
+
this.parentInjector = parentInjector;
|
|
1310
1322
|
this.isValid = false;
|
|
1311
1323
|
this.title = confirmDialogData?.title ?? 'Are you sure?';
|
|
1312
1324
|
this.warning = confirmDialogData?.warning;
|
|
1313
|
-
|
|
1314
|
-
|
|
1325
|
+
if (isString(confirmDialogData?.content)) {
|
|
1326
|
+
this.content = confirmDialogData?.content;
|
|
1327
|
+
}
|
|
1328
|
+
else if (isObject(confirmDialogData?.content)) {
|
|
1329
|
+
this.contentComponentOutlet = confirmDialogData?.content.componentOutlet;
|
|
1330
|
+
// TODO: When Angular 16 ready use ngComponentOutletInputs
|
|
1331
|
+
this.contentComponentInjector = Injector.create({
|
|
1332
|
+
providers: [{ provide: 'contentComponentInputs', useValue: confirmDialogData?.content.componentInputs }],
|
|
1333
|
+
parent: parentInjector,
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1315
1336
|
this.validationMessage = extendValidationMessage(confirmDialogData?.validationMessage ?? 'Please, type <code>confirm</code> to confirm.');
|
|
1316
1337
|
this.validationValue = confirmDialogData?.validationValue ?? 'confirm';
|
|
1317
1338
|
this.confirmButton = confirmDialogData?.confirmButton ?? 'Confirm';
|
|
@@ -1321,15 +1342,15 @@ class GioConfirmAndValidateDialogComponent {
|
|
|
1321
1342
|
this.isValid = toLower(confirmValue) === toLower(this.validationValue);
|
|
1322
1343
|
}
|
|
1323
1344
|
}
|
|
1324
|
-
GioConfirmAndValidateDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioConfirmAndValidateDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1325
|
-
GioConfirmAndValidateDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioConfirmAndValidateDialogComponent, selector: "gio-confirm-and-validate-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content class=\"confirm-dialog__body\">\n <gio-banner-warning *ngIf=\"warning\"><span [innerHTML]=\"warning\"></span></gio-banner-warning>\n <p class=\"confirm-dialog__body__content\" *ngIf=\"content\" [innerHTML]=\"content\"></p>\n\n <div class=\"confirm-dialog__body__content\" *ngIf=\"
|
|
1345
|
+
GioConfirmAndValidateDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioConfirmAndValidateDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1346
|
+
GioConfirmAndValidateDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioConfirmAndValidateDialogComponent, selector: "gio-confirm-and-validate-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content class=\"confirm-dialog__body\">\n <gio-banner-warning *ngIf=\"warning\"><span [innerHTML]=\"warning\"></span></gio-banner-warning>\n <p class=\"confirm-dialog__body__content\" *ngIf=\"content\" [innerHTML]=\"content\"></p>\n\n <div class=\"confirm-dialog__body__content\" *ngIf=\"contentComponentOutlet && !contentComponentInjector\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet\"></ng-container>\n </div>\n\n <div class=\"confirm-dialog__body__content\" *ngIf=\"contentComponentOutlet && contentComponentInjector\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet; injector: contentComponentInjector\"></ng-container>\n </div>\n\n <p class=\"confirm-dialog__body__validate-message\" [innerHTML]=\"validationMessage\"></p>\n <mat-form-field class=\"confirm-dialog__body__validate-input\" appearance=\"outline\" floatLabel=\"always\">\n <mat-label>Confirm</mat-label>\n <input\n matInput\n cdkFocusInitial\n type=\"text\"\n [placeholder]=\"validationValue\"\n [ngModel]=\"confirmValue\"\n (ngModelChange)=\"onConfirmChange($event)\"\n required\n data-testid=\"confirm-input-dialog\"\n />\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\" class=\"confirm-dialog__actions\">\n <button\n class=\"confirm-dialog__confirm-button\"\n [disabled]=\"!isValid\"\n color=\"warn\"\n mat-raised-button\n [mat-dialog-close]=\"true\"\n data-testid=\"confirm-dialog\"\n >\n {{ confirmButton }}\n </button>\n <button class=\"confirm-dialog__cancel-button\" mat-flat-button [mat-dialog-close]=\"false\">\n {{ cancelButton }}\n </button>\n</mat-dialog-actions>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.confirm-dialog__title{white-space:pre-wrap}.confirm-dialog__body__content{color:#606274;white-space:pre-wrap}.confirm-dialog__body__validate-message{margin-bottom:8px;white-space:pre-wrap}.confirm-dialog__body__validate-input{overflow:hidden;width:100%;height:62px;padding-top:4px}.confirm-dialog__actions{display:flex;flex-direction:row-reverse;justify-content:flex-start}\n"], components: [{ type: GioBannerWarningComponent, selector: "gio-banner-warning" }, { type: i3$3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i3$3.MatLabel, selector: "mat-label" }, { type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
1326
1347
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioConfirmAndValidateDialogComponent, decorators: [{
|
|
1327
1348
|
type: Component,
|
|
1328
|
-
args: [{ selector: 'gio-confirm-and-validate-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content class=\"confirm-dialog__body\">\n <gio-banner-warning *ngIf=\"warning\"><span [innerHTML]=\"warning\"></span></gio-banner-warning>\n <p class=\"confirm-dialog__body__content\" *ngIf=\"content\" [innerHTML]=\"content\"></p>\n\n <div class=\"confirm-dialog__body__content\" *ngIf=\"
|
|
1349
|
+
args: [{ selector: 'gio-confirm-and-validate-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"confirm-dialog__title\">{{ title }}</h2>\n\n<mat-dialog-content class=\"confirm-dialog__body\">\n <gio-banner-warning *ngIf=\"warning\"><span [innerHTML]=\"warning\"></span></gio-banner-warning>\n <p class=\"confirm-dialog__body__content\" *ngIf=\"content\" [innerHTML]=\"content\"></p>\n\n <div class=\"confirm-dialog__body__content\" *ngIf=\"contentComponentOutlet && !contentComponentInjector\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet\"></ng-container>\n </div>\n\n <div class=\"confirm-dialog__body__content\" *ngIf=\"contentComponentOutlet && contentComponentInjector\">\n <ng-container *ngComponentOutlet=\"contentComponentOutlet; injector: contentComponentInjector\"></ng-container>\n </div>\n\n <p class=\"confirm-dialog__body__validate-message\" [innerHTML]=\"validationMessage\"></p>\n <mat-form-field class=\"confirm-dialog__body__validate-input\" appearance=\"outline\" floatLabel=\"always\">\n <mat-label>Confirm</mat-label>\n <input\n matInput\n cdkFocusInitial\n type=\"text\"\n [placeholder]=\"validationValue\"\n [ngModel]=\"confirmValue\"\n (ngModelChange)=\"onConfirmChange($event)\"\n required\n data-testid=\"confirm-input-dialog\"\n />\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\" class=\"confirm-dialog__actions\">\n <button\n class=\"confirm-dialog__confirm-button\"\n [disabled]=\"!isValid\"\n color=\"warn\"\n mat-raised-button\n [mat-dialog-close]=\"true\"\n data-testid=\"confirm-dialog\"\n >\n {{ confirmButton }}\n </button>\n <button class=\"confirm-dialog__cancel-button\" mat-flat-button [mat-dialog-close]=\"false\">\n {{ cancelButton }}\n </button>\n</mat-dialog-actions>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.confirm-dialog__title{white-space:pre-wrap}.confirm-dialog__body__content{color:#606274;white-space:pre-wrap}.confirm-dialog__body__validate-message{margin-bottom:8px;white-space:pre-wrap}.confirm-dialog__body__validate-input{overflow:hidden;width:100%;height:62px;padding-top:4px}.confirm-dialog__actions{display:flex;flex-direction:row-reverse;justify-content:flex-start}\n"] }]
|
|
1329
1350
|
}], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
1330
1351
|
type: Inject,
|
|
1331
1352
|
args: [MAT_DIALOG_DATA]
|
|
1332
|
-
}] }]; } });
|
|
1353
|
+
}] }, { type: i0.Injector }]; } });
|
|
1333
1354
|
const extendValidationMessage = (validationMessage) => {
|
|
1334
1355
|
return validationMessage.replace('<code>', '<code class="gio-badge-warning">');
|
|
1335
1356
|
};
|