@gravitee/ui-particles-angular 17.7.2 → 17.7.3-license-dialog-button-2414371

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.
@@ -3331,6 +3331,9 @@ class GioFormJsonSchemaComponent {
3331
3331
  this.touched = false;
3332
3332
  this.isValid$ = new ReplaySubject(1); // Wait JsonSchema to be loaded to check if it's valid
3333
3333
  this.stateChanges$ = new Subject();
3334
+ this.isWritingValue = false;
3335
+ this.isStable = false;
3336
+ this.isUpdatingParent = false;
3334
3337
  if (ngControl) {
3335
3338
  // Setting the value accessor directly (instead of using
3336
3339
  // the providers `NG_VALUE_ACCESSOR`) to avoid running into a circular import.
@@ -3377,9 +3380,9 @@ class GioFormJsonSchemaComponent {
3377
3380
  // Sync control value with default value (without emit event) as long as the component is not ready
3378
3381
  // When formly is initialised, it emits several values as it builds up step by step.
3379
3382
  this.formGroup.valueChanges
3380
- .pipe(distinctUntilChanged(isEqual), tap(value => {
3381
- this.ngControl?.control?.reset(value, { emitEvent: false });
3382
- }), takeUntil(this.ready), takeUntil(this.unsubscribe$))
3383
+ .pipe(distinctUntilChanged(isEqual), filter(() => !this.isWritingValue && this.isStable), tap(value => {
3384
+ this.syncValueToParent(value);
3385
+ }), takeUntil(this.unsubscribe$))
3383
3386
  .subscribe();
3384
3387
  // Avoid ExpressionChangedAfterItHasBeenCheckedError on project
3385
3388
  this.changeDetectorRef.markForCheck();
@@ -3437,7 +3440,22 @@ class GioFormJsonSchemaComponent {
3437
3440
  }
3438
3441
  // From ControlValueAccessor
3439
3442
  writeValue(value) {
3443
+ if (this.isUpdatingParent)
3444
+ return;
3445
+ this.isWritingValue = true;
3446
+ this.isStable = false;
3440
3447
  this.model = cloneDeep(value) ?? {};
3448
+ setTimeout(() => {
3449
+ this.isWritingValue = false;
3450
+ this.isStable = true;
3451
+ this.syncValueToParent(this.formGroup.value);
3452
+ this.changeDetectorRef.markForCheck();
3453
+ }, 0);
3454
+ }
3455
+ syncValueToParent(value) {
3456
+ this.isUpdatingParent = true;
3457
+ this.ngControl?.control?.setValue(value, { emitEvent: false });
3458
+ this.isUpdatingParent = false;
3441
3459
  }
3442
3460
  // From ControlValueAccessor
3443
3461
  registerOnChange(fn) {
@@ -6608,11 +6626,11 @@ class GioLicenseDialogComponent {
6608
6626
  this.dialogRef.close();
6609
6627
  }
6610
6628
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: GioLicenseDialogComponent, deps: [{ token: i1$5.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
6611
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: GioLicenseDialogComponent, isStandalone: false, selector: "gio-license-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2025 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<div class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"primary\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n @if (!featureInfo.hideDays) {\n <div class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n }\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #ffc2ac);color:var(--gio-oem-palette--active-contrast, #1e1b1b)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8a8383}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Kanit,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#322f2f;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#322f2f;text-align:center}\n"], dependencies: [{ kind: "directive", type: i1$5.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SafePipe, name: "safe" }] }); }
6629
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: GioLicenseDialogComponent, isStandalone: false, selector: "gio-license-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2025 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<div class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"primary\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n @if (!featureInfo.hideDays) {\n <div class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n }\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #ffc2ac);color:var(--gio-oem-palette--active-contrast, #1e1b1b)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8a8383}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Kanit,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#322f2f;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{min-width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#322f2f;text-align:center}\n"], dependencies: [{ kind: "directive", type: i1$5.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SafePipe, name: "safe" }] }); }
6612
6630
  }
6613
6631
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: GioLicenseDialogComponent, decorators: [{
6614
6632
  type: Component,
6615
- args: [{ selector: 'gio-license-dialog', standalone: false, template: "<!--\n\n Copyright (C) 2025 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<div class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"primary\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n @if (!featureInfo.hideDays) {\n <div class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n }\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #ffc2ac);color:var(--gio-oem-palette--active-contrast, #1e1b1b)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8a8383}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Kanit,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#322f2f;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#322f2f;text-align:center}\n"] }]
6633
+ args: [{ selector: 'gio-license-dialog', standalone: false, template: "<!--\n\n Copyright (C) 2025 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<div class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"primary\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n @if (!featureInfo.hideDays) {\n <div class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n }\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #ffc2ac);color:var(--gio-oem-palette--active-contrast, #1e1b1b)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8a8383}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Kanit,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#322f2f;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{min-width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#322f2f;text-align:center}\n"] }]
6616
6634
  }], ctorParameters: () => [{ type: i1$5.MatDialogRef }, { type: undefined, decorators: [{
6617
6635
  type: Inject,
6618
6636
  args: [MAT_DIALOG_DATA]