@gravitee/ui-particles-angular 4.10.6 → 4.11.0-393-menu-position-cca7423

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.
@@ -2619,6 +2619,9 @@
2619
2619
  this.gioMenuService = gioMenuService;
2620
2620
  this.reduced = false;
2621
2621
  }
2622
+ GioMenuComponent.prototype.ngOnInit = function () {
2623
+ this.gioMenuService.reduced(this.reduced);
2624
+ };
2622
2625
  GioMenuComponent.prototype.reduceMenu = function () {
2623
2626
  this.reduced = !this.reduced;
2624
2627
  this.gioMenuService.reduced(this.reduced);
@@ -2833,29 +2836,61 @@
2833
2836
  * limitations under the License.
2834
2837
  */
2835
2838
 
2839
+ /*
2840
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
2841
+ *
2842
+ * Licensed under the Apache License, Version 2.0 (the "License");
2843
+ * you may not use this file except in compliance with the License.
2844
+ * You may obtain a copy of the License at
2845
+ *
2846
+ * http://www.apache.org/licenses/LICENSE-2.0
2847
+ *
2848
+ * Unless required by applicable law or agreed to in writing, software
2849
+ * distributed under the License is distributed on an "AS IS" BASIS,
2850
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2851
+ * See the License for the specific language governing permissions and
2852
+ * limitations under the License.
2853
+ */
2854
+ var GioSubmenuTitleDirective = /** @class */ (function () {
2855
+ function GioSubmenuTitleDirective() {
2856
+ }
2857
+ return GioSubmenuTitleDirective;
2858
+ }());
2859
+ GioSubmenuTitleDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuTitleDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
2860
+ GioSubmenuTitleDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: GioSubmenuTitleDirective, selector: "[gioSubmenuTitle]", ngImport: i0__namespace });
2861
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuTitleDirective, decorators: [{
2862
+ type: i0.Directive,
2863
+ args: [{
2864
+ selector: '[gioSubmenuTitle]',
2865
+ }]
2866
+ }] });
2836
2867
  var GioSubmenuComponent = /** @class */ (function () {
2837
2868
  function GioSubmenuComponent(gioMenuService) {
2838
2869
  this.gioMenuService = gioMenuService;
2839
2870
  this.reduced = false;
2871
+ this.loaded = false;
2840
2872
  this.overlayOptions = { open: false };
2841
2873
  this.hover = false;
2842
2874
  this.unsubscribe$ = new rxjs.Subject();
2843
2875
  }
2844
- GioSubmenuComponent.prototype.ngOnInit = function () {
2876
+ GioSubmenuComponent.prototype.ngAfterViewInit = function () {
2845
2877
  var _this = this;
2846
- rxjs.combineLatest([this.gioMenuService.reduce, this.gioMenuService.overlayObservable])
2847
- .pipe(operators.takeUntil(this.unsubscribe$), operators.tap(function (_a) {
2848
- var _b = __read(_a, 2), reduced = _b[0], overlayOptions = _b[1];
2878
+ this.gioMenuService.reduce
2879
+ .pipe(operators.takeUntil(this.unsubscribe$), operators.tap(function (reduced) {
2849
2880
  _this.reduced = reduced;
2850
- if (_this.gioSubmenu) {
2851
- _this.overlayOptions = overlayOptions;
2852
- if (_this.reduced) {
2881
+ _this.loaded = true;
2882
+ if (_this.reduced) {
2883
+ _this.gioMenuService.overlayObservable
2884
+ .pipe(operators.takeUntil(_this.unsubscribe$), operators.tap(function (overlayOptions) {
2853
2885
  var top = overlayOptions.top || 0;
2886
+ _this.overlayOptions = overlayOptions;
2854
2887
  _this.gioSubmenu.nativeElement.style.top = top + "px";
2855
2888
  _this.gioSubmenu.nativeElement.style.height = 'auto';
2856
2889
  _this.gioSubmenu.nativeElement.style.maxHeight = "calc(100vh - " + (top + 8) + "px)";
2857
- return;
2858
- }
2890
+ }))
2891
+ .subscribe();
2892
+ }
2893
+ else {
2859
2894
  _this.gioSubmenu.nativeElement.style.height = '100%';
2860
2895
  _this.gioSubmenu.nativeElement.style.maxHeight = 'none';
2861
2896
  }
@@ -2877,7 +2912,7 @@
2877
2912
  return GioSubmenuComponent;
2878
2913
  }());
2879
2914
  GioSubmenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuComponent, deps: [{ token: GioMenuService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2880
- GioSubmenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioSubmenuComponent, selector: "gio-submenu", viewQueries: [{ propertyName: "gioSubmenu", first: true, predicate: ["gioSubmenu"], descendants: true }], ngImport: i0__namespace, 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__reduced]=\"reduced\"\n [class.gio-submenu__overlay]=\"overlayOptions.open\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{z-index:100}.gio-submenu{display:flex;width:266px;height:100%;flex:none;flex-direction:column;flex-grow:0;justify-content:flex-start;padding:16px;background:#100c27}.gio-submenu__reduced{position:absolute;overflow:auto;margin:0 0 0 8px;border-radius:8px;opacity:0;visibility:hidden}.gio-submenu__overlay,.gio-submenu:hover{opacity:1;transition:opacity .23s,visibility .23s;visibility:visible}\n"] });
2915
+ GioSubmenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioSubmenuComponent, selector: "gio-submenu", viewQueries: [{ propertyName: "gioSubmenu", first: true, predicate: ["gioSubmenu"], descendants: true }], ngImport: i0__namespace, 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 (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__reduced{position:absolute;overflow:auto;margin:0 0 0 8px;border-radius:8px;opacity:0;visibility:hidden}.gio-submenu__loaded{display:flex}.gio-submenu__overlay,.gio-submenu:hover{opacity:1;transition:opacity .23s,visibility .23s;visibility:visible}.gio-submenu__title{padding-bottom:8px;color:#fff}.gio-submenu .hide{display:none}\n"] });
2881
2916
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuComponent, decorators: [{
2882
2917
  type: i0.Component,
2883
2918
  args: [{
@@ -2991,13 +3026,13 @@
2991
3026
  return GioSubmenuModule;
2992
3027
  }());
2993
3028
  GioSubmenuModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2994
- GioSubmenuModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuModule, declarations: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent], imports: [i2$1.CommonModule, i1$1.MatIconModule, GioIconsModule], exports: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent] });
3029
+ GioSubmenuModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuModule, declarations: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuTitleDirective], imports: [i2$1.CommonModule, i1$1.MatIconModule, GioIconsModule], exports: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuTitleDirective] });
2995
3030
  GioSubmenuModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuModule, imports: [[i2$1.CommonModule, i1$1.MatIconModule, GioIconsModule]] });
2996
3031
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSubmenuModule, decorators: [{
2997
3032
  type: i0.NgModule,
2998
3033
  args: [{
2999
- declarations: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent],
3000
- exports: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent],
3034
+ declarations: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuTitleDirective],
3035
+ exports: [GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuTitleDirective],
3001
3036
  imports: [i2$1.CommonModule, i1$1.MatIconModule, GioIconsModule],
3002
3037
  }]
3003
3038
  }] });
@@ -3478,6 +3513,7 @@
3478
3513
  exports.GioSubmenuGroupComponent = GioSubmenuGroupComponent;
3479
3514
  exports.GioSubmenuItemComponent = GioSubmenuItemComponent;
3480
3515
  exports.GioSubmenuModule = GioSubmenuModule;
3516
+ exports.GioSubmenuTitleDirective = GioSubmenuTitleDirective;
3481
3517
  exports.GioTopBarComponent = GioTopBarComponent;
3482
3518
  exports.GioTopBarContentComponent = GioTopBarContentComponent;
3483
3519
  exports.GioTopBarLinkComponent = GioTopBarLinkComponent;