@gravitee/ui-particles-angular 7.36.0-fix-ps-v2-99e90dc → 7.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +7 -28
- package/fesm2015/gravitee-ui-particles-angular.mjs +4 -26
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +4 -25
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-json-schema/gio-form-json-schema.component.d.ts +4 -6
- package/package.json +1 -1
|
@@ -3333,12 +3333,9 @@ class GioFormJsonSchemaComponent {
|
|
|
3333
3333
|
this.gioFormFocusInvalidIgnore = true;
|
|
3334
3334
|
this.formGroup = new FormGroup({});
|
|
3335
3335
|
this.options = {};
|
|
3336
|
-
// When true the form is ready and control status are up-to-date
|
|
3337
|
-
// Useful to know when initial control status can be used
|
|
3338
|
-
this.ready = new EventEmitter();
|
|
3339
|
-
this.isReady = false;
|
|
3340
3336
|
this.model = {};
|
|
3341
3337
|
this.fields = [];
|
|
3338
|
+
this.loading = true;
|
|
3342
3339
|
this.isDisabled = false;
|
|
3343
3340
|
this._onChange = () => ({});
|
|
3344
3341
|
this._onTouched = () => ({});
|
|
@@ -3370,12 +3367,6 @@ class GioFormJsonSchemaComponent {
|
|
|
3370
3367
|
this.fields = [this.gioFormlyJsonSchema.toFormlyFieldConfig(jsonSchema)];
|
|
3371
3368
|
}
|
|
3372
3369
|
}
|
|
3373
|
-
ngOnChanges(changes) {
|
|
3374
|
-
if (changes.jsonSchema) {
|
|
3375
|
-
this.isReady = false;
|
|
3376
|
-
this.ready.next(false);
|
|
3377
|
-
}
|
|
3378
|
-
}
|
|
3379
3370
|
ngOnInit() {
|
|
3380
3371
|
// When the parent form is touched, mark all the sub formGroup as touched if not already touched
|
|
3381
3372
|
const parentControl = this.ngControl?.control?.parent;
|
|
@@ -3421,26 +3412,16 @@ class GioFormJsonSchemaComponent {
|
|
|
3421
3412
|
this.ngControl?.control?.updateValueAndValidity({
|
|
3422
3413
|
emitEvent: false,
|
|
3423
3414
|
});
|
|
3424
|
-
// After the first state change, the form is ready
|
|
3425
|
-
if (!this.isReady) {
|
|
3426
|
-
this.isReady = true;
|
|
3427
|
-
this.ready.emit(true);
|
|
3428
|
-
}
|
|
3429
3415
|
});
|
|
3430
3416
|
}
|
|
3431
3417
|
ngAfterViewInit() {
|
|
3432
|
-
// Init control value with default value without emit event
|
|
3433
|
-
this.ngControl?.control?.setValue(this.formGroup.value, { emitEvent: false });
|
|
3434
|
-
this.changeDetectorRef.markForCheck();
|
|
3435
|
-
this.changeDetectorRef.detectChanges();
|
|
3436
3418
|
// Group all valueChanges events emit by formly in a single one
|
|
3437
3419
|
merge(this.formGroup.statusChanges, this.formGroup.valueChanges)
|
|
3438
|
-
.pipe(debounceTime(100),
|
|
3439
|
-
// Force fist stateChanges$
|
|
3440
|
-
startWith({}), takeUntil(this.unsubscribe$))
|
|
3420
|
+
.pipe(debounceTime(100), takeUntil(this.unsubscribe$))
|
|
3441
3421
|
.subscribe(() => {
|
|
3442
3422
|
this.stateChanges$.next();
|
|
3443
3423
|
});
|
|
3424
|
+
this.stateChanges$.next();
|
|
3444
3425
|
}
|
|
3445
3426
|
ngOnDestroy() {
|
|
3446
3427
|
this.unsubscribe$.next();
|
|
@@ -3475,7 +3456,7 @@ class GioFormJsonSchemaComponent {
|
|
|
3475
3456
|
}
|
|
3476
3457
|
}
|
|
3477
3458
|
GioFormJsonSchemaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, deps: [{ token: GioFormlyJsonSchemaService }, { token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: i7.NgControl, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3478
|
-
GioFormJsonSchemaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormJsonSchemaComponent, selector: "gio-form-json-schema", inputs: { jsonSchema: "jsonSchema", options: "options" },
|
|
3459
|
+
GioFormJsonSchemaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormJsonSchemaComponent, selector: "gio-form-json-schema", inputs: { jsonSchema: "jsonSchema", options: "options" }, host: { properties: { "attr.gioFormFocusInvalidIgnore": "this.gioFormFocusInvalidIgnore" } }, ngImport: i0, template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`, isInline: true, styles: ["::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{margin-bottom:-1.34375em}\n"], components: [{ type: i1$5.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3479
3460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, decorators: [{
|
|
3480
3461
|
type: Component,
|
|
3481
3462
|
args: [{ selector: 'gio-form-json-schema', template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`, styles: ["::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{margin-bottom:-1.34375em}\n"] }]
|
|
@@ -3490,8 +3471,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3490
3471
|
type: Input
|
|
3491
3472
|
}], options: [{
|
|
3492
3473
|
type: Input
|
|
3493
|
-
}], ready: [{
|
|
3494
|
-
type: Output
|
|
3495
3474
|
}] } });
|
|
3496
3475
|
|
|
3497
3476
|
/*
|