@gravitee/ui-particles-angular 5.11.0 → 5.12.0-monaco-editor-762fa6b

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.
Files changed (34) hide show
  1. package/esm2020/lib/gio-confirm-and-validate-dialog/gio-confirm-and-validate-dialog.module.mjs +2 -2
  2. package/esm2020/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid.directive.mjs +61 -0
  3. package/esm2020/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid.module.mjs +31 -0
  4. package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +7 -2
  5. package/esm2020/lib/gio-form-json-schema/model/GioJsonSchema.mjs +1 -1
  6. package/esm2020/lib/gio-form-json-schema/type-component/array-type.component.mjs +9 -9
  7. package/esm2020/lib/gio-form-json-schema/type-component/multischema-type.component.mjs +3 -3
  8. package/esm2020/lib/gio-form-json-schema/type-component/object-type.component.mjs +3 -3
  9. package/esm2020/lib/gio-monaco-editor/gio-monaco-editor.component.mjs +172 -0
  10. package/esm2020/lib/gio-monaco-editor/gio-monaco-editor.harness.mjs +63 -0
  11. package/esm2020/lib/gio-monaco-editor/gio-monaco-editor.module.mjs +58 -0
  12. package/esm2020/lib/gio-monaco-editor/gio-monaco-editor.testing.component.mjs +55 -0
  13. package/esm2020/lib/gio-monaco-editor/models/GioMonacoEditorConfig.mjs +18 -0
  14. package/esm2020/lib/gio-monaco-editor/models/MonacoEditorTheme.mjs +2 -0
  15. package/esm2020/lib/gio-monaco-editor/services/gio-language-json.service.mjs +71 -0
  16. package/esm2020/lib/gio-monaco-editor/services/gio-monaco-editor.service.mjs +67 -0
  17. package/esm2020/lib/public-api.mjs +6 -1
  18. package/fesm2015/gravitee-ui-particles-angular.mjs +566 -16
  19. package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
  20. package/fesm2020/gravitee-ui-particles-angular.mjs +577 -16
  21. package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
  22. package/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid.directive.d.ts +11 -0
  23. package/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid.module.d.ts +7 -0
  24. package/lib/gio-form-json-schema/model/GioJsonSchema.d.ts +17 -11
  25. package/lib/gio-monaco-editor/gio-monaco-editor.component.d.ts +45 -0
  26. package/lib/gio-monaco-editor/gio-monaco-editor.harness.d.ts +16 -0
  27. package/lib/gio-monaco-editor/gio-monaco-editor.module.d.ts +18 -0
  28. package/lib/gio-monaco-editor/gio-monaco-editor.testing.component.d.ts +12 -0
  29. package/lib/gio-monaco-editor/models/GioMonacoEditorConfig.d.ts +6 -0
  30. package/lib/gio-monaco-editor/models/MonacoEditorTheme.d.ts +1 -0
  31. package/lib/gio-monaco-editor/services/gio-language-json.service.d.ts +17 -0
  32. package/lib/gio-monaco-editor/services/gio-monaco-editor.service.d.ts +18 -0
  33. package/lib/public-api.d.ts +5 -0
  34. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { trigger, transition, style, animate } from '@angular/animations';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Component, HostBinding, Input, Output, HostListener, NgModule, Optional, Self, ViewChild, Directive, Inject, forwardRef, ChangeDetectionStrategy, Injectable, ViewEncapsulation, ContentChildren, Host, ContentChild } from '@angular/core';
4
- import { timer, Subject, fromEvent, of, BehaviorSubject } from 'rxjs';
3
+ import { EventEmitter, Component, HostBinding, Input, Output, HostListener, NgModule, Optional, Self, ViewChild, Directive, Inject, forwardRef, ChangeDetectionStrategy, Injectable, ViewEncapsulation, ContentChildren, Host, ContentChild, InjectionToken } from '@angular/core';
4
+ import { timer, Subject, fromEvent, of, BehaviorSubject, ReplaySubject } from 'rxjs';
5
5
  import * as i1 from '@angular/material/card';
6
6
  import { MatCardModule } from '@angular/material/card';
7
7
  import * as i2 from '@angular/material/button';
@@ -12,7 +12,7 @@ import { ComponentHarness, HarnessPredicate, parallel, TestKey } from '@angular/
12
12
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
13
13
  import * as i3$1 from '@angular/material/form-field';
14
14
  import { MatFormFieldControl, MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
15
- import { isEmpty, toLower, dropRight, isNil, isArray, remove, isObject, cloneDeep, set } from 'lodash';
15
+ import { isEmpty, toLower, dropRight, isNil, isArray, remove, isObject, cloneDeep, set, uniqueId } from 'lodash';
16
16
  import { startWith, map, distinctUntilChanged, tap, debounce, takeUntil, delay, filter, switchMap } from 'rxjs/operators';
17
17
  import * as i7 from '@angular/forms';
18
18
  import { FormsModule, FormArray, FormGroup, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule, NgControl } from '@angular/forms';
@@ -49,6 +49,7 @@ import { FieldType, FieldArrayType, FieldWrapper, FormlyModule } from '@ngx-form
49
49
  import { FormlyMaterialModule } from '@ngx-formly/material';
50
50
  import * as i3$2 from '@angular/material/slide-toggle';
51
51
  import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
52
+ import { TestBed } from '@angular/core/testing';
52
53
 
53
54
  /*
54
55
  * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
@@ -2880,6 +2881,11 @@ class GioFormJsonSchemaComponent {
2880
2881
  }
2881
2882
  }
2882
2883
  ngOnInit() {
2884
+ // When the parent form is touched, mark all the sub formGroup as touched
2885
+ const parentControl = this.ngControl?.control?.parent;
2886
+ parentControl?.statusChanges
2887
+ ?.pipe(takeUntil(this.unsubscribe$), map(() => parentControl?.touched), filter(touched => touched === true), tap(() => this.formGroup.markAllAsTouched()))
2888
+ .subscribe();
2883
2889
  this.formGroup.statusChanges.pipe(takeUntil(this.unsubscribe$)).subscribe(status => {
2884
2890
  if (status === 'VALID') {
2885
2891
  this.ngControl?.control?.setErrors(null);
@@ -3128,7 +3134,7 @@ GioFjsObjectTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
3128
3134
  <div class="wrapper">
3129
3135
  <div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
3130
3136
  <p *ngIf="to.description">{{ to.description }}</p>
3131
- <div class="wrapper__error" *ngIf="showError && formControl.errors">
3137
+ <div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
3132
3138
  <formly-validation-message [field]="field"></formly-validation-message>
3133
3139
  </div>
3134
3140
  <div class="wrapper__fields">
@@ -3142,7 +3148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3142
3148
  <div class="wrapper">
3143
3149
  <div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
3144
3150
  <p *ngIf="to.description">{{ to.description }}</p>
3145
- <div class="wrapper__error" *ngIf="showError && formControl.errors">
3151
+ <div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
3146
3152
  <formly-validation-message [field]="field"></formly-validation-message>
3147
3153
  </div>
3148
3154
  <div class="wrapper__fields">
@@ -3175,7 +3181,7 @@ class GioFjsArrayTypeComponent extends FieldArrayType {
3175
3181
  }
3176
3182
  GioFjsArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3177
3183
  GioFjsArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsArrayTypeComponent, selector: "gio-fjs-array-type", usesInheritance: true, ngImport: i0, template: `
3178
- <div class="wrapper">
3184
+ <div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
3179
3185
  <div class="wrapper__header">
3180
3186
  <div class="wrapper__header__text">
3181
3187
  <div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
@@ -3188,11 +3194,11 @@ GioFjsArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
3188
3194
  </div>
3189
3195
  </div>
3190
3196
 
3191
- <div class="wrapper__error" *ngIf="showError && formControl.errors">
3197
+ <div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
3192
3198
  <formly-validation-message [field]="field"></formly-validation-message>
3193
3199
  </div>
3194
3200
 
3195
- <div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3201
+ <div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3196
3202
  <div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
3197
3203
  <formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
3198
3204
  <div class="wrapper__rows__row__remove">
@@ -3207,11 +3213,11 @@ GioFjsArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
3207
3213
  </div>
3208
3214
  </div>
3209
3215
  </div>
3210
- `, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper:empty{display:none}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__rows__row{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper__rows__row+.wrapper__rows__row{padding-top:3px;border-top:1px solid #d3d5dc;margin-top:4px}.wrapper__rows__row__field{flex:1 1 auto}.wrapper__rows__row__remove{flex:0 0 auto}\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"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3216
+ `, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper.error{border-color:#ec4899}.wrapper:empty{display:none}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__rows__row{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper__rows__row+.wrapper__rows__row{padding-top:3px;border-top:1px solid #d3d5dc;margin-top:4px}.wrapper__rows__row__field{flex:1 1 auto}.wrapper__rows__row__remove{flex:0 0 auto}\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"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3211
3217
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsArrayTypeComponent, decorators: [{
3212
3218
  type: Component,
3213
3219
  args: [{ selector: 'gio-fjs-array-type', template: `
3214
- <div class="wrapper">
3220
+ <div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
3215
3221
  <div class="wrapper__header">
3216
3222
  <div class="wrapper__header__text">
3217
3223
  <div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
@@ -3224,11 +3230,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3224
3230
  </div>
3225
3231
  </div>
3226
3232
 
3227
- <div class="wrapper__error" *ngIf="showError && formControl.errors">
3233
+ <div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
3228
3234
  <formly-validation-message [field]="field"></formly-validation-message>
3229
3235
  </div>
3230
3236
 
3231
- <div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3237
+ <div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3232
3238
  <div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
3233
3239
  <formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
3234
3240
  <div class="wrapper__rows__row__remove">
@@ -3243,7 +3249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3243
3249
  </div>
3244
3250
  </div>
3245
3251
  </div>
3246
- `, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper:empty{display:none}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__rows__row{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper__rows__row+.wrapper__rows__row{padding-top:3px;border-top:1px solid #d3d5dc;margin-top:4px}.wrapper__rows__row__field{flex:1 1 auto}.wrapper__rows__row__remove{flex:0 0 auto}\n"] }]
3252
+ `, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper.error{border-color:#ec4899}.wrapper:empty{display:none}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__rows__row{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper__rows__row+.wrapper__rows__row{padding-top:3px;border-top:1px solid #d3d5dc;margin-top:4px}.wrapper__rows__row__field{flex:1 1 auto}.wrapper__rows__row__remove{flex:0 0 auto}\n"] }]
3247
3253
  }] });
3248
3254
 
3249
3255
  function minItemsValidationMessage(error, field) {
@@ -3340,7 +3346,7 @@ GioFjsMultiSchemaTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
3340
3346
  <div class="wrapper">
3341
3347
  <div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
3342
3348
  <p *ngIf="props.description">{{ props.description }}</p>
3343
- <div class="wrapper__error" *ngIf="showError && formControl.errors">
3349
+ <div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
3344
3350
  <formly-validation-message [field]="field"></formly-validation-message>
3345
3351
  </div>
3346
3352
  <formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
@@ -3352,7 +3358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3352
3358
  <div class="wrapper">
3353
3359
  <div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
3354
3360
  <p *ngIf="props.description">{{ props.description }}</p>
3355
- <div class="wrapper__error" *ngIf="showError && formControl.errors">
3361
+ <div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
3356
3362
  <formly-validation-message [field]="field"></formly-validation-message>
3357
3363
  </div>
3358
3364
  <formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
@@ -3656,6 +3662,561 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3656
3662
  * limitations under the License.
3657
3663
  */
3658
3664
 
3665
+ /*
3666
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3667
+ *
3668
+ * Licensed under the Apache License, Version 2.0 (the "License");
3669
+ * you may not use this file except in compliance with the License.
3670
+ * You may obtain a copy of the License at
3671
+ *
3672
+ * http://www.apache.org/licenses/LICENSE-2.0
3673
+ *
3674
+ * Unless required by applicable law or agreed to in writing, software
3675
+ * distributed under the License is distributed on an "AS IS" BASIS,
3676
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3677
+ * See the License for the specific language governing permissions and
3678
+ * limitations under the License.
3679
+ */
3680
+ class GioFormFocusInvalidDirective {
3681
+ constructor(renderer, formGroupDirective) {
3682
+ this.renderer = renderer;
3683
+ this.formGroupDirective = formGroupDirective;
3684
+ }
3685
+ onFormSubmit() {
3686
+ const selector = '.ng-invalid[formControlName],input.ng-invalid,mat-select.ng-invalid,textarea.ng-invalid,.gio-ng-invalid';
3687
+ try {
3688
+ let invalidControl = this.renderer.selectRootElement(selector, true);
3689
+ // If the form is a GioFormJsonSchema, we need to focus the first invalid control inside
3690
+ if (invalidControl.tagName === 'GIO-FORM-JSON-SCHEMA') {
3691
+ invalidControl = invalidControl.querySelector(selector);
3692
+ }
3693
+ if (invalidControl) {
3694
+ // Mark all controls as touched to display errors
3695
+ if (this.formGroupDirective) {
3696
+ this.formGroupDirective.control.markAllAsTouched();
3697
+ this.formGroupDirective.control.updateValueAndValidity();
3698
+ }
3699
+ invalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });
3700
+ invalidControl.focus({ preventScroll: true });
3701
+ }
3702
+ }
3703
+ catch (error) {
3704
+ // Best effort. If the focus doesn't work it's not very important
3705
+ // 🧪 Useful to avoid som error in tests
3706
+ }
3707
+ }
3708
+ }
3709
+ GioFormFocusInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormFocusInvalidDirective, deps: [{ token: i0.Renderer2 }, { token: i7.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3710
+ GioFormFocusInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormFocusInvalidDirective, selector: "form[gioFormFocusInvalid]", host: { listeners: { "submit": "onFormSubmit()" } }, ngImport: i0 });
3711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormFocusInvalidDirective, decorators: [{
3712
+ type: Directive,
3713
+ args: [{
3714
+ selector: 'form[gioFormFocusInvalid]',
3715
+ }]
3716
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i7.FormGroupDirective, decorators: [{
3717
+ type: Optional
3718
+ }] }]; }, propDecorators: { onFormSubmit: [{
3719
+ type: HostListener,
3720
+ args: ['submit']
3721
+ }] } });
3722
+
3723
+ /*
3724
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3725
+ *
3726
+ * Licensed under the Apache License, Version 2.0 (the "License");
3727
+ * you may not use this file except in compliance with the License.
3728
+ * You may obtain a copy of the License at
3729
+ *
3730
+ * http://www.apache.org/licenses/LICENSE-2.0
3731
+ *
3732
+ * Unless required by applicable law or agreed to in writing, software
3733
+ * distributed under the License is distributed on an "AS IS" BASIS,
3734
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3735
+ * See the License for the specific language governing permissions and
3736
+ * limitations under the License.
3737
+ */
3738
+ class GioFormFocusInvalidModule {
3739
+ }
3740
+ GioFormFocusInvalidModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormFocusInvalidModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3741
+ GioFormFocusInvalidModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormFocusInvalidModule, declarations: [GioFormFocusInvalidDirective], exports: [GioFormFocusInvalidDirective] });
3742
+ GioFormFocusInvalidModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormFocusInvalidModule });
3743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormFocusInvalidModule, decorators: [{
3744
+ type: NgModule,
3745
+ args: [{
3746
+ declarations: [GioFormFocusInvalidDirective],
3747
+ exports: [GioFormFocusInvalidDirective],
3748
+ }]
3749
+ }] });
3750
+
3751
+ /*
3752
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3753
+ *
3754
+ * Licensed under the Apache License, Version 2.0 (the "License");
3755
+ * you may not use this file except in compliance with the License.
3756
+ * You may obtain a copy of the License at
3757
+ *
3758
+ * http://www.apache.org/licenses/LICENSE-2.0
3759
+ *
3760
+ * Unless required by applicable law or agreed to in writing, software
3761
+ * distributed under the License is distributed on an "AS IS" BASIS,
3762
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3763
+ * See the License for the specific language governing permissions and
3764
+ * limitations under the License.
3765
+ */
3766
+ const GIO_MONACO_EDITOR_CONFIG = new InjectionToken('gio-monaco-editor-config');
3767
+
3768
+ /*
3769
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3770
+ *
3771
+ * Licensed under the Apache License, Version 2.0 (the "License");
3772
+ * you may not use this file except in compliance with the License.
3773
+ * You may obtain a copy of the License at
3774
+ *
3775
+ * http://www.apache.org/licenses/LICENSE-2.0
3776
+ *
3777
+ * Unless required by applicable law or agreed to in writing, software
3778
+ * distributed under the License is distributed on an "AS IS" BASIS,
3779
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3780
+ * See the License for the specific language governing permissions and
3781
+ * limitations under the License.
3782
+ */
3783
+ class GioMonacoEditorService {
3784
+ constructor() {
3785
+ this.loaded$ = new ReplaySubject(1);
3786
+ this.loaded = false;
3787
+ }
3788
+ loadEditor() {
3789
+ if (this.loaded) {
3790
+ // Already loaded, do nothing.
3791
+ return Promise.resolve();
3792
+ }
3793
+ this.loaded = true;
3794
+ return new Promise(resolve => {
3795
+ // Monaco is already loaded
3796
+ if (typeof window.monaco === 'object') {
3797
+ resolve();
3798
+ return;
3799
+ }
3800
+ const onGotAmdLoader = () => {
3801
+ // Load Monaco
3802
+ window.require.config({ paths: { vs: 'assets/monaco-editor/min/vs' } });
3803
+ window.require(['vs/editor/editor.main'], () => {
3804
+ resolve();
3805
+ });
3806
+ };
3807
+ // Load AMD loader if necessary
3808
+ if (!window.require) {
3809
+ const loaderScript = document.createElement('script');
3810
+ loaderScript.type = 'text/javascript';
3811
+ loaderScript.src = 'assets/monaco-editor/min/vs/loader.js';
3812
+ loaderScript.addEventListener('load', onGotAmdLoader);
3813
+ document.body.appendChild(loaderScript);
3814
+ }
3815
+ else {
3816
+ onGotAmdLoader();
3817
+ }
3818
+ }).then(() => {
3819
+ this.loaded$.next({ monaco: window.monaco });
3820
+ });
3821
+ }
3822
+ }
3823
+ GioMonacoEditorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3824
+ GioMonacoEditorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorService, providedIn: 'root' });
3825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorService, decorators: [{
3826
+ type: Injectable,
3827
+ args: [{
3828
+ providedIn: 'root',
3829
+ }]
3830
+ }] });
3831
+
3832
+ /*
3833
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3834
+ *
3835
+ * Licensed under the Apache License, Version 2.0 (the "License");
3836
+ * you may not use this file except in compliance with the License.
3837
+ * You may obtain a copy of the License at
3838
+ *
3839
+ * http://www.apache.org/licenses/LICENSE-2.0
3840
+ *
3841
+ * Unless required by applicable law or agreed to in writing, software
3842
+ * distributed under the License is distributed on an "AS IS" BASIS,
3843
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3844
+ * See the License for the specific language governing permissions and
3845
+ * limitations under the License.
3846
+ */
3847
+ class GioLanguageJsonService {
3848
+ constructor(codeEditorService) {
3849
+ this.unsubscribe$ = new Subject();
3850
+ codeEditorService.loaded$.pipe(takeUntil(this.unsubscribe$)).subscribe(event => {
3851
+ this.setup(event.monaco);
3852
+ });
3853
+ }
3854
+ ngOnDestroy() {
3855
+ this.unsubscribe$.next();
3856
+ this.unsubscribe$.complete();
3857
+ }
3858
+ setup(monaco) {
3859
+ if (!monaco) {
3860
+ throw new Error('Monaco is not loaded');
3861
+ }
3862
+ this.monaco = monaco;
3863
+ const defaults = monaco.languages.json.jsonDefaults;
3864
+ defaults.setDiagnosticsOptions({
3865
+ validate: true,
3866
+ allowComments: true,
3867
+ });
3868
+ }
3869
+ addSchemas(id, definitions = []) {
3870
+ if (!this.monaco) {
3871
+ throw new Error('Monaco is not loaded');
3872
+ }
3873
+ const defaults = this.monaco.languages.json.jsonDefaults;
3874
+ const options = defaults.diagnosticsOptions;
3875
+ let schemas = definitions.map(({ uri, schema }) => ({
3876
+ uri,
3877
+ schema,
3878
+ fileMatch: [id || '*.json'],
3879
+ }));
3880
+ if (options && options.schemas && options.schemas.length > 0) {
3881
+ schemas = [...options.schemas, ...schemas];
3882
+ }
3883
+ defaults.setDiagnosticsOptions({
3884
+ ...options,
3885
+ schemas: schemas,
3886
+ });
3887
+ }
3888
+ }
3889
+ GioLanguageJsonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLanguageJsonService, deps: [{ token: GioMonacoEditorService }], target: i0.ɵɵFactoryTarget.Injectable });
3890
+ GioLanguageJsonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLanguageJsonService, providedIn: 'root' });
3891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLanguageJsonService, decorators: [{
3892
+ type: Injectable,
3893
+ args: [{
3894
+ providedIn: 'root',
3895
+ }]
3896
+ }], ctorParameters: function () { return [{ type: GioMonacoEditorService }]; } });
3897
+
3898
+ /*
3899
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3900
+ *
3901
+ * Licensed under the Apache License, Version 2.0 (the "License");
3902
+ * you may not use this file except in compliance with the License.
3903
+ * You may obtain a copy of the License at
3904
+ *
3905
+ * http://www.apache.org/licenses/LICENSE-2.0
3906
+ *
3907
+ * Unless required by applicable law or agreed to in writing, software
3908
+ * distributed under the License is distributed on an "AS IS" BASIS,
3909
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3910
+ * See the License for the specific language governing permissions and
3911
+ * limitations under the License.
3912
+ */
3913
+ class GioMonacoEditorComponent {
3914
+ constructor(config, monacoEditorService, languageJsonService, hostElement, changeDetectorRef, ngZone) {
3915
+ this.config = config;
3916
+ this.monacoEditorService = monacoEditorService;
3917
+ this.languageJsonService = languageJsonService;
3918
+ this.hostElement = hostElement;
3919
+ this.changeDetectorRef = changeDetectorRef;
3920
+ this.ngZone = ngZone;
3921
+ this.options = {};
3922
+ this.id = uniqueId('gio-monaco-editor-');
3923
+ this.loading = true;
3924
+ this.defaultOptions = {
3925
+ contextmenu: false,
3926
+ minimap: {
3927
+ enabled: true,
3928
+ },
3929
+ automaticLayout: true,
3930
+ scrollBeyondLastLine: false,
3931
+ };
3932
+ this.value = '';
3933
+ this.readOnly = false;
3934
+ this._onChange = () => ({});
3935
+ this._onTouched = () => ({});
3936
+ this.unsubscribe$ = new Subject();
3937
+ this.monacoEditorService.loadEditor();
3938
+ }
3939
+ ngAfterViewInit() {
3940
+ // Wait until monaco editor is available
3941
+ this.monacoEditorService.loaded$.pipe(takeUntil(this.unsubscribe$)).subscribe(({ monaco }) => {
3942
+ this.setupEditor(monaco);
3943
+ this.loading = false;
3944
+ this.changeDetectorRef.detectChanges();
3945
+ });
3946
+ }
3947
+ ngOnDestroy() {
3948
+ if (this.standaloneCodeEditor) {
3949
+ this.standaloneCodeEditor.dispose();
3950
+ this.standaloneCodeEditor = undefined;
3951
+ }
3952
+ if (this.textModel) {
3953
+ this.textModel.dispose();
3954
+ this.textModel = undefined;
3955
+ }
3956
+ this.unsubscribe$.next();
3957
+ this.unsubscribe$.complete();
3958
+ }
3959
+ // From ControlValueAccessor interface
3960
+ writeValue(_value) {
3961
+ if (_value) {
3962
+ this.value = _value;
3963
+ }
3964
+ if (this.textModel) {
3965
+ this.textModel.setValue(this.value);
3966
+ }
3967
+ }
3968
+ // From ControlValueAccessor interface
3969
+ registerOnChange(fn) {
3970
+ this._onChange = fn;
3971
+ }
3972
+ // From ControlValueAccessor interface
3973
+ registerOnTouched(fn) {
3974
+ this._onTouched = fn;
3975
+ }
3976
+ // From ControlValueAccessor interface
3977
+ setDisabledState(isDisabled) {
3978
+ this.readOnly = isDisabled;
3979
+ }
3980
+ setupEditor(monaco) {
3981
+ if (!this.hostElement) {
3982
+ throw new Error('No editor ref found.');
3983
+ }
3984
+ const domElement = this.hostElement.nativeElement;
3985
+ const settings = {
3986
+ value: this.value,
3987
+ language: this.languageConfig?.language ?? 'text',
3988
+ uri: `code-${uniqueId()}`,
3989
+ };
3990
+ this.ngZone.runOutsideAngular(() => {
3991
+ this.textModel = monaco.editor.createModel(settings.value, settings.language, monaco.Uri.parse(settings.uri));
3992
+ });
3993
+ const options = Object.assign({}, this.defaultOptions, this.options, {
3994
+ readOnly: this.readOnly,
3995
+ theme: this.config.theme ?? 'vs',
3996
+ model: this.textModel,
3997
+ });
3998
+ this.standaloneCodeEditor = monaco.editor.create(domElement, {
3999
+ ...options,
4000
+ });
4001
+ this.textModel?.onDidChangeContent(() => {
4002
+ const newValue = this.textModel?.getValue();
4003
+ this.ngZone.run(() => {
4004
+ newValue && this._onChange(newValue);
4005
+ this._onTouched();
4006
+ });
4007
+ });
4008
+ this.standaloneCodeEditor?.onDidBlurEditorWidget(() => {
4009
+ this.ngZone.run(() => {
4010
+ this._onTouched();
4011
+ });
4012
+ });
4013
+ this.setupLanguage(settings.uri, this.languageConfig);
4014
+ }
4015
+ setupLanguage(uri, languageConfig) {
4016
+ if (!languageConfig) {
4017
+ return;
4018
+ }
4019
+ const { language } = languageConfig;
4020
+ if (language) {
4021
+ const lang = language.toLowerCase();
4022
+ switch (lang) {
4023
+ case 'json':
4024
+ if (languageConfig.schemas) {
4025
+ this.languageJsonService.addSchemas(uri, languageConfig.schemas);
4026
+ }
4027
+ break;
4028
+ default:
4029
+ break;
4030
+ }
4031
+ }
4032
+ }
4033
+ }
4034
+ GioMonacoEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorComponent, deps: [{ token: GIO_MONACO_EDITOR_CONFIG }, { token: GioMonacoEditorService }, { token: GioLanguageJsonService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
4035
+ GioMonacoEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioMonacoEditorComponent, selector: "gio-monaco-editor", inputs: { languageConfig: "languageConfig", options: "options" }, providers: [
4036
+ {
4037
+ provide: NG_VALUE_ACCESSOR,
4038
+ useExisting: forwardRef(() => GioMonacoEditorComponent),
4039
+ multi: true,
4040
+ },
4041
+ ], ngImport: i0, template: ` <div *ngIf="loading">Loading...</div>`, isInline: true, styles: [":host{display:block;height:100%;min-height:150px}\n"], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorComponent, decorators: [{
4043
+ type: Component,
4044
+ args: [{ selector: 'gio-monaco-editor', template: ` <div *ngIf="loading">Loading...</div>`, providers: [
4045
+ {
4046
+ provide: NG_VALUE_ACCESSOR,
4047
+ useExisting: forwardRef(() => GioMonacoEditorComponent),
4048
+ multi: true,
4049
+ },
4050
+ ], styles: [":host{display:block;height:100%;min-height:150px}\n"] }]
4051
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4052
+ type: Inject,
4053
+ args: [GIO_MONACO_EDITOR_CONFIG]
4054
+ }] }, { type: GioMonacoEditorService }, { type: GioLanguageJsonService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { languageConfig: [{
4055
+ type: Input
4056
+ }], options: [{
4057
+ type: Input
4058
+ }] } });
4059
+
4060
+ /*
4061
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
4062
+ *
4063
+ * Licensed under the Apache License, Version 2.0 (the "License");
4064
+ * you may not use this file except in compliance with the License.
4065
+ * You may obtain a copy of the License at
4066
+ *
4067
+ * http://www.apache.org/licenses/LICENSE-2.0
4068
+ *
4069
+ * Unless required by applicable law or agreed to in writing, software
4070
+ * distributed under the License is distributed on an "AS IS" BASIS,
4071
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4072
+ * See the License for the specific language governing permissions and
4073
+ * limitations under the License.
4074
+ */
4075
+ class GioMonacoEditorModule {
4076
+ static forRoot(config) {
4077
+ return {
4078
+ ngModule: GioMonacoEditorModule,
4079
+ providers: [
4080
+ {
4081
+ provide: GIO_MONACO_EDITOR_CONFIG,
4082
+ useValue: config,
4083
+ },
4084
+ ],
4085
+ };
4086
+ }
4087
+ }
4088
+ GioMonacoEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4089
+ GioMonacoEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorModule, declarations: [GioMonacoEditorComponent], imports: [CommonModule, HttpClientModule, ReactiveFormsModule], exports: [GioMonacoEditorComponent] });
4090
+ GioMonacoEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorModule, providers: [
4091
+ {
4092
+ provide: GIO_MONACO_EDITOR_CONFIG,
4093
+ useValue: {},
4094
+ },
4095
+ ], imports: [[CommonModule, HttpClientModule, ReactiveFormsModule]] });
4096
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorModule, decorators: [{
4097
+ type: NgModule,
4098
+ args: [{
4099
+ imports: [CommonModule, HttpClientModule, ReactiveFormsModule],
4100
+ declarations: [GioMonacoEditorComponent],
4101
+ exports: [GioMonacoEditorComponent],
4102
+ providers: [
4103
+ {
4104
+ provide: GIO_MONACO_EDITOR_CONFIG,
4105
+ useValue: {},
4106
+ },
4107
+ ],
4108
+ }]
4109
+ }] });
4110
+
4111
+ /*
4112
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
4113
+ *
4114
+ * Licensed under the Apache License, Version 2.0 (the "License");
4115
+ * you may not use this file except in compliance with the License.
4116
+ * You may obtain a copy of the License at
4117
+ *
4118
+ * http://www.apache.org/licenses/LICENSE-2.0
4119
+ *
4120
+ * Unless required by applicable law or agreed to in writing, software
4121
+ * distributed under the License is distributed on an "AS IS" BASIS,
4122
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4123
+ * See the License for the specific language governing permissions and
4124
+ * limitations under the License.
4125
+ */
4126
+ /**
4127
+ * This component is used to test the GioMonacoEditorComponent.
4128
+ * This component simulates monaco editor with a simple input.
4129
+ */
4130
+ class GioMonacoEditorTestingComponent extends GioMonacoEditorComponent {
4131
+ get getValue() {
4132
+ return this.value;
4133
+ }
4134
+ changeValue(value) {
4135
+ this._onTouched();
4136
+ this._onChange(value);
4137
+ }
4138
+ }
4139
+ GioMonacoEditorTestingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorTestingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4140
+ GioMonacoEditorTestingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioMonacoEditorTestingComponent, selector: "gio-monaco-editor", providers: [
4141
+ {
4142
+ provide: NG_VALUE_ACCESSOR,
4143
+ useExisting: forwardRef(() => GioMonacoEditorTestingComponent),
4144
+ multi: true,
4145
+ },
4146
+ ], usesInheritance: true, ngImport: i0, template: '<input type="text" [value]="getValue" (input)="changeValue($any($event).target?.value)" />', isInline: true });
4147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioMonacoEditorTestingComponent, decorators: [{
4148
+ type: Component,
4149
+ args: [{
4150
+ selector: 'gio-monaco-editor',
4151
+ template: '<input type="text" [value]="getValue" (input)="changeValue($any($event).target?.value)" />',
4152
+ providers: [
4153
+ {
4154
+ provide: NG_VALUE_ACCESSOR,
4155
+ useExisting: forwardRef(() => GioMonacoEditorTestingComponent),
4156
+ multi: true,
4157
+ },
4158
+ ],
4159
+ }]
4160
+ }] });
4161
+
4162
+ /*
4163
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
4164
+ *
4165
+ * Licensed under the Apache License, Version 2.0 (the "License");
4166
+ * you may not use this file except in compliance with the License.
4167
+ * You may obtain a copy of the License at
4168
+ *
4169
+ * http://www.apache.org/licenses/LICENSE-2.0
4170
+ *
4171
+ * Unless required by applicable law or agreed to in writing, software
4172
+ * distributed under the License is distributed on an "AS IS" BASIS,
4173
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4174
+ * See the License for the specific language governing permissions and
4175
+ * limitations under the License.
4176
+ */
4177
+ // Hack to replace the default gio-monaco-editor component with fake one for testing purpose.
4178
+ try {
4179
+ TestBed.overrideModule(GioMonacoEditorModule, {
4180
+ remove: {
4181
+ declarations: [GioMonacoEditorComponent],
4182
+ exports: [GioMonacoEditorComponent],
4183
+ },
4184
+ add: {
4185
+ declarations: [GioMonacoEditorTestingComponent],
4186
+ exports: [GioMonacoEditorTestingComponent],
4187
+ },
4188
+ });
4189
+ }
4190
+ catch (e) {
4191
+ // Do nothing
4192
+ }
4193
+ class GioMonacoEditorHarness extends ComponentHarness {
4194
+ constructor() {
4195
+ super(...arguments);
4196
+ this.getInputEl = this.locatorFor('input');
4197
+ }
4198
+ /**
4199
+ * Gets a `HarnessPredicate` that can be used to search for a `GioMonacoEditorHarness` that meets
4200
+ * certain criteria.
4201
+ *
4202
+ * @param options Options for filtering which input instances are considered a match.
4203
+ * @return a `HarnessPredicate` configured with the given options.
4204
+ */
4205
+ static with(options = {}) {
4206
+ return new HarnessPredicate(GioMonacoEditorHarness, options);
4207
+ }
4208
+ async setValue(value) {
4209
+ const inputEl = await this.getInputEl();
4210
+ await inputEl.clear();
4211
+ await inputEl.sendKeys(value);
4212
+ }
4213
+ async getValue() {
4214
+ const inputEl = await this.getInputEl();
4215
+ return inputEl.getProperty('value');
4216
+ }
4217
+ }
4218
+ GioMonacoEditorHarness.hostSelector = 'gio-monaco-editor';
4219
+
3659
4220
  /*
3660
4221
  * Copyright (C) 2021 The Gravitee team (http://gravitee.io)
3661
4222
  *
@@ -3692,5 +4253,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3692
4253
  * Generated bundle index. Do not edit.
3693
4254
  */
3694
4255
 
3695
- export { GioAvatarComponent, GioAvatarModule, GioBannerActionDirective, GioBannerBodyDirective, GioBannerComponent, GioBannerErrorComponent, GioBannerInfoComponent, GioBannerModule, GioBannerSuccessComponent, GioBannerWarningComponent, GioBreadcrumbComponent, GioBreadcrumbItemDirective, GioBreadcrumbModule, GioConfirmAndValidateDialogComponent, GioConfirmAndValidateDialogHarness, GioConfirmAndValidateDialogModule, GioConfirmDialogComponent, GioConfirmDialogHarness, GioConfirmDialogModule, GioFormFilePickerAddButtonComponent, GioFormFilePickerComponent, GioFormFilePickerEmptyComponent, GioFormFilePickerInputHarness, GioFormFilePickerLabelComponent, GioFormFilePickerModule, GioFormHeadersComponent, GioFormHeadersHarness, GioFormHeadersModule, GioFormJsonSchemaComponent, GioFormJsonSchemaModule, GioFormLabelComponent, GioFormPrefixDirective, GioFormSlideToggleComponent, GioFormSlideToggleDirective, GioFormSlideToggleModule, GioFormTagsInputComponent, GioFormTagsInputHarness, GioFormTagsInputModule, GioIconsModule, GioMatConfigModule, GioMenuComponent, GioMenuFooterComponent, GioMenuHeaderComponent, GioMenuItemComponent, GioMenuListComponent, GioMenuModule, GioMenuSelectorComponent, GioMenuSelectorHarness, GioMenuService, GioSaveBarComponent, GioSaveBarHarness, GioSaveBarModule, GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuModule, GioSubmenuTitleDirective, GioTopBarComponent, GioTopBarContentComponent, GioTopBarLinkComponent, GioTopBarLinkModule, GioTopBarMenuComponent, GioTopBarMenuModule, GioTopBarModule, NewFile };
4256
+ export { GioAvatarComponent, GioAvatarModule, GioBannerActionDirective, GioBannerBodyDirective, GioBannerComponent, GioBannerErrorComponent, GioBannerInfoComponent, GioBannerModule, GioBannerSuccessComponent, GioBannerWarningComponent, GioBreadcrumbComponent, GioBreadcrumbItemDirective, GioBreadcrumbModule, GioConfirmAndValidateDialogComponent, GioConfirmAndValidateDialogHarness, GioConfirmAndValidateDialogModule, GioConfirmDialogComponent, GioConfirmDialogHarness, GioConfirmDialogModule, GioFormFilePickerAddButtonComponent, GioFormFilePickerComponent, GioFormFilePickerEmptyComponent, GioFormFilePickerInputHarness, GioFormFilePickerLabelComponent, GioFormFilePickerModule, GioFormFocusInvalidDirective, GioFormFocusInvalidModule, GioFormHeadersComponent, GioFormHeadersHarness, GioFormHeadersModule, GioFormJsonSchemaComponent, GioFormJsonSchemaModule, GioFormLabelComponent, GioFormPrefixDirective, GioFormSlideToggleComponent, GioFormSlideToggleDirective, GioFormSlideToggleModule, GioFormTagsInputComponent, GioFormTagsInputHarness, GioFormTagsInputModule, GioIconsModule, GioMatConfigModule, GioMenuComponent, GioMenuFooterComponent, GioMenuHeaderComponent, GioMenuItemComponent, GioMenuListComponent, GioMenuModule, GioMenuSelectorComponent, GioMenuSelectorHarness, GioMenuService, GioMonacoEditorComponent, GioMonacoEditorHarness, GioMonacoEditorModule, GioSaveBarComponent, GioSaveBarHarness, GioSaveBarModule, GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuModule, GioSubmenuTitleDirective, GioTopBarComponent, GioTopBarContentComponent, GioTopBarLinkComponent, GioTopBarLinkModule, GioTopBarMenuComponent, GioTopBarMenuModule, GioTopBarModule, NewFile };
3696
4257
  //# sourceMappingURL=gravitee-ui-particles-angular.mjs.map