@gravitee/ui-particles-angular 7.16.0 → 7.16.1-fix-ps-6a2ed04

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.
@@ -2130,8 +2130,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2130
2130
  }]
2131
2131
  }] });
2132
2132
  class GioSubmenuComponent {
2133
- constructor(gioMenuService) {
2133
+ constructor(gioMenuService, changeDetectorRef) {
2134
2134
  this.gioMenuService = gioMenuService;
2135
+ this.changeDetectorRef = changeDetectorRef;
2135
2136
  this.theme = 'dark';
2136
2137
  this.reduced = false;
2137
2138
  this.loaded = false;
@@ -2153,7 +2154,9 @@ class GioSubmenuComponent {
2153
2154
  this.gioSubmenu.nativeElement.style.maxHeight = `calc(100vh - ${top + 8}px)`;
2154
2155
  }
2155
2156
  }), filter(overlayOptions => !!overlayOptions.focus), delay(200), switchMap(() => of(this.gioSubmenu.nativeElement.querySelectorAll('gio-submenu-item'))), filter(submenuItems => submenuItems.length > 0), tap(submenuItems => submenuItems[0].focus()))
2156
- .subscribe();
2157
+ .subscribe(() => {
2158
+ this.changeDetectorRef.detectChanges();
2159
+ });
2157
2160
  this.gioMenuService.reduce
2158
2161
  .pipe(takeUntil(this.unsubscribe$), filter(reduced => !reduced), tap(() => {
2159
2162
  this.reduced = false;
@@ -2161,7 +2164,9 @@ class GioSubmenuComponent {
2161
2164
  this.gioSubmenu.nativeElement.style.height = '100%';
2162
2165
  this.gioSubmenu.nativeElement.style.maxHeight = 'none';
2163
2166
  }))
2164
- .subscribe();
2167
+ .subscribe(() => {
2168
+ this.changeDetectorRef.detectChanges();
2169
+ });
2165
2170
  }
2166
2171
  ngOnDestroy() {
2167
2172
  this.unsubscribe$.next();
@@ -2181,12 +2186,12 @@ class GioSubmenuComponent {
2181
2186
  .subscribe();
2182
2187
  }
2183
2188
  }
2184
- GioSubmenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuComponent, deps: [{ token: GioMenuService }], target: i0.ɵɵFactoryTarget.Component });
2189
+ GioSubmenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuComponent, deps: [{ token: GioMenuService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2185
2190
  GioSubmenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioSubmenuComponent, selector: "gio-submenu", inputs: { theme: "theme" }, host: { listeners: { "keydown": "onKeydownHandler($event)" } }, viewQueries: [{ propertyName: "gioSubmenu", first: true, predicate: ["gioSubmenu"], descendants: true }], ngImport: i0, template: "<!--\n\n Copyright (C) 2022 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\n #gioSubmenu\n class=\"gio-submenu\"\n [class.gio-submenu__loaded]=\"loaded\"\n [class.gio-submenu__reduced]=\"reduced\"\n [class.gio-submenu__overlay]=\"overlayOptions.open\"\n [class.gio-submenu__light]=\"theme === 'light'\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n>\n <div #title class=\"gio-submenu__title\" [class.hide]=\"!title.children.length || reduced\">\n <ng-content select=\"[gioSubmenuTitle]\"></ng-content>\n </div>\n <ng-content></ng-content>\n</div>\n", styles: [":host{z-index:100}.gio-submenu{display:none;width:266px;height:100%;flex:none;flex-direction:column;flex-grow:0;justify-content:flex-start;padding:16px;background:#100c27}.gio-submenu__light{background:#51438e}.gio-submenu__reduced{position:absolute;overflow:auto;border-radius:8px;margin:0 0 0 8px;opacity:0;visibility:hidden}.gio-submenu__loaded{display:flex}.gio-submenu__overlay,.gio-submenu:hover{opacity:1;transition:opacity .15s,visibility .15s;visibility:visible}.gio-submenu__title{padding-bottom:8px;color:#fff}.gio-submenu .hide{display:none}\n"] });
2186
2191
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuComponent, decorators: [{
2187
2192
  type: Component,
2188
2193
  args: [{ selector: 'gio-submenu', template: "<!--\n\n Copyright (C) 2022 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\n #gioSubmenu\n class=\"gio-submenu\"\n [class.gio-submenu__loaded]=\"loaded\"\n [class.gio-submenu__reduced]=\"reduced\"\n [class.gio-submenu__overlay]=\"overlayOptions.open\"\n [class.gio-submenu__light]=\"theme === 'light'\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n>\n <div #title class=\"gio-submenu__title\" [class.hide]=\"!title.children.length || reduced\">\n <ng-content select=\"[gioSubmenuTitle]\"></ng-content>\n </div>\n <ng-content></ng-content>\n</div>\n", styles: [":host{z-index:100}.gio-submenu{display:none;width:266px;height:100%;flex:none;flex-direction:column;flex-grow:0;justify-content:flex-start;padding:16px;background:#100c27}.gio-submenu__light{background:#51438e}.gio-submenu__reduced{position:absolute;overflow:auto;border-radius:8px;margin:0 0 0 8px;opacity:0;visibility:hidden}.gio-submenu__loaded{display:flex}.gio-submenu__overlay,.gio-submenu:hover{opacity:1;transition:opacity .15s,visibility .15s;visibility:visible}.gio-submenu__title{padding-bottom:8px;color:#fff}.gio-submenu .hide{display:none}\n"] }]
2189
- }], ctorParameters: function () { return [{ type: GioMenuService }]; }, propDecorators: { theme: [{
2194
+ }], ctorParameters: function () { return [{ type: GioMenuService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { theme: [{
2190
2195
  type: Input
2191
2196
  }], gioSubmenu: [{
2192
2197
  type: ViewChild,
@@ -2974,8 +2979,27 @@ class GioFormJsonSchemaComponent {
2974
2979
  return this.isValid$.pipe(takeUntil(this.unsubscribe$), take(1), map(isValid => (isValid ? null : { invalid: true })));
2975
2980
  });
2976
2981
  this.ngControl?.control?.updateValueAndValidity({ emitEvent: false });
2982
+ // When the parent form is touched, mark all the sub formGroup as touched if not already touched
2983
+ const parentControl = this.ngControl?.control?.parent;
2984
+ parentControl?.statusChanges
2985
+ ?.pipe(takeUntil(this.unsubscribe$), map(() => parentControl?.touched), filter(touched => touched === true), distinctUntilChanged())
2986
+ .subscribe(() => {
2987
+ if (this.isDisabled) {
2988
+ return;
2989
+ }
2990
+ this.formGroup.markAllAsTouched();
2991
+ this.stateChanges$.next();
2992
+ });
2993
+ // Group all valueChanges events emit by formly in a single one
2994
+ merge(this.formGroup.statusChanges, this.formGroup.valueChanges)
2995
+ .pipe(takeUntil(this.unsubscribe$), debounceTime(100))
2996
+ .subscribe(() => {
2997
+ this.stateChanges$.next();
2998
+ });
2999
+ }
3000
+ ngAfterViewInit() {
2977
3001
  // Subscribe to state changes to manage touches, status and value
2978
- this.stateChanges$.pipe(takeUntil(this.unsubscribe$), debounceTime(100)).subscribe(() => {
3002
+ this.stateChanges$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
2979
3003
  const { status, value, touched } = this.formGroup;
2980
3004
  if (this.isDisabled) {
2981
3005
  return;
@@ -2998,25 +3022,6 @@ class GioFormJsonSchemaComponent {
2998
3022
  this.ngControl?.control?.updateValueAndValidity({ emitEvent: false });
2999
3023
  this.changeDetectorRef.detectChanges();
3000
3024
  });
3001
- // When the parent form is touched, mark all the sub formGroup as touched if not already touched
3002
- const parentControl = this.ngControl?.control?.parent;
3003
- parentControl?.statusChanges
3004
- ?.pipe(takeUntil(this.unsubscribe$), map(() => parentControl?.touched), filter(touched => touched === true), distinctUntilChanged())
3005
- .subscribe(() => {
3006
- if (this.isDisabled) {
3007
- return;
3008
- }
3009
- this.formGroup.markAllAsTouched();
3010
- this.stateChanges$.next();
3011
- });
3012
- // Group all valueChanges events emit by formly in a single one
3013
- merge(this.formGroup.statusChanges, this.formGroup.valueChanges)
3014
- .pipe(takeUntil(this.unsubscribe$))
3015
- .subscribe(() => {
3016
- this.stateChanges$.next();
3017
- });
3018
- }
3019
- ngAfterViewInit() {
3020
3025
  this.stateChanges$.next();
3021
3026
  }
3022
3027
  ngOnDestroy() {