@gravitee/ui-particles-angular 4.11.1-302-breadcrumb-2caef66 → 4.11.1-302-breadcrumb-538d2ed

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 (21) hide show
  1. package/bundles/gravitee-ui-particles-angular.umd.js +17 -81
  2. package/bundles/gravitee-ui-particles-angular.umd.js.map +1 -1
  3. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb-item.directive.js +31 -0
  4. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb.component.js +9 -17
  5. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb.module.js +5 -6
  6. package/esm2015/lib/gio-breadcrumb/index.js +2 -5
  7. package/fesm2015/gravitee-ui-particles-angular.js +17 -91
  8. package/fesm2015/gravitee-ui-particles-angular.js.map +1 -1
  9. package/lib/gio-breadcrumb/gio-breadcrumb-item.directive.d.ts +8 -0
  10. package/lib/gio-breadcrumb/gio-breadcrumb.component.d.ts +4 -6
  11. package/lib/gio-breadcrumb/gio-breadcrumb.module.d.ts +4 -5
  12. package/lib/gio-breadcrumb/index.d.ts +1 -4
  13. package/package.json +1 -1
  14. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb-item/GioBreadcrumbItem.js +0 -2
  15. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb-item/GioBreadcrumbItemDynamicComponent.js +0 -2
  16. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb-item/gio-breadcrumb-dynamic-item.directive.js +0 -31
  17. package/esm2015/lib/gio-breadcrumb/gio-breadcrumb-item/gio-breadcrumb-item.component.js +0 -71
  18. package/lib/gio-breadcrumb/gio-breadcrumb-item/GioBreadcrumbItem.d.ts +0 -8
  19. package/lib/gio-breadcrumb/gio-breadcrumb-item/GioBreadcrumbItemDynamicComponent.d.ts +0 -3
  20. package/lib/gio-breadcrumb/gio-breadcrumb-item/gio-breadcrumb-dynamic-item.directive.d.ts +0 -8
  21. package/lib/gio-breadcrumb/gio-breadcrumb-item/gio-breadcrumb-item.component.d.ts +0 -16
@@ -3509,77 +3509,20 @@
3509
3509
  * See the License for the specific language governing permissions and
3510
3510
  * limitations under the License.
3511
3511
  */
3512
- var GioBreadcrumbDynamicItemDirective = /** @class */ (function () {
3513
- function GioBreadcrumbDynamicItemDirective(viewContainerRef) {
3514
- this.viewContainerRef = viewContainerRef;
3512
+ var GioBreadcrumbItemDirective = /** @class */ (function () {
3513
+ function GioBreadcrumbItemDirective(templateRef) {
3514
+ this.templateRef = templateRef;
3515
3515
  }
3516
- return GioBreadcrumbDynamicItemDirective;
3516
+ return GioBreadcrumbItemDirective;
3517
3517
  }());
3518
- GioBreadcrumbDynamicItemDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbDynamicItemDirective, deps: [{ token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3519
- GioBreadcrumbDynamicItemDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: GioBreadcrumbDynamicItemDirective, selector: "[gioBreadcrumbDynamicHost]", ngImport: i0__namespace });
3520
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbDynamicItemDirective, decorators: [{
3518
+ GioBreadcrumbItemDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbItemDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3519
+ GioBreadcrumbItemDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: GioBreadcrumbItemDirective, selector: "[gio-breadcrumb-item]", ngImport: i0__namespace });
3520
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbItemDirective, decorators: [{
3521
3521
  type: i0.Directive,
3522
3522
  args: [{
3523
- selector: '[gioBreadcrumbDynamicHost]',
3523
+ selector: '[gio-breadcrumb-item]',
3524
3524
  }]
3525
- }], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }]; } });
3526
-
3527
- var GioBreadcrumbItemComponent = /** @class */ (function () {
3528
- function GioBreadcrumbItemComponent(componentFactoryResolver) {
3529
- this.componentFactoryResolver = componentFactoryResolver;
3530
- this.active = false;
3531
- this.itemClicked = new i0.EventEmitter();
3532
- }
3533
- GioBreadcrumbItemComponent.prototype.onItemClick = function (breadcrumbItem) {
3534
- this.itemClicked.emit(breadcrumbItem.targetRoute);
3535
- };
3536
- GioBreadcrumbItemComponent.prototype.loadComponent = function (breadcrumbItem) {
3537
- var _a;
3538
- if (breadcrumbItem.component && this.breadcrumbDynamicHost) {
3539
- var breadcrumbDynamicComponentComponentFactory = this.componentFactoryResolver.resolveComponentFactory(breadcrumbItem.component);
3540
- var viewContainerRef = this.breadcrumbDynamicHost.viewContainerRef;
3541
- viewContainerRef.clear();
3542
- var componentRef_1 = viewContainerRef.createComponent(breadcrumbDynamicComponentComponentFactory);
3543
- Object.entries(((_a = breadcrumbItem.data) === null || _a === void 0 ? void 0 : _a.nativeElement) || {}).forEach(function (_b) {
3544
- var _c = __read(_b, 2), attribute = _c[0], attributeValue = _c[1];
3545
- componentRef_1.location.nativeElement[attribute] = attributeValue;
3546
- });
3547
- Object.entries(breadcrumbItem.data || {})
3548
- .filter(function (_b) {
3549
- var _c = __read(_b, 1), key = _c[0];
3550
- return key != 'nativeElement';
3551
- })
3552
- .forEach(function (_b) {
3553
- var _c = __read(_b, 2), property = _c[0], propertyValue = _c[1];
3554
- componentRef_1.instance[property] = propertyValue;
3555
- });
3556
- }
3557
- };
3558
- GioBreadcrumbItemComponent.prototype.ngAfterViewInit = function () {
3559
- if (this.breadcrumbItem) {
3560
- this.loadComponent(this.breadcrumbItem);
3561
- }
3562
- };
3563
- return GioBreadcrumbItemComponent;
3564
- }());
3565
- GioBreadcrumbItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbItemComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
3566
- GioBreadcrumbItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioBreadcrumbItemComponent, selector: "gio-breadcrumb-item", inputs: { breadcrumbItem: "breadcrumbItem", active: "active" }, outputs: { itemClicked: "itemClicked" }, viewQueries: [{ propertyName: "breadcrumbDynamicHost", first: true, predicate: GioBreadcrumbDynamicItemDirective, descendants: true, static: 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<a\n *ngIf=\"breadcrumbItem?.displayName\"\n (click)=\"onItemClick(breadcrumbItem)\"\n class=\"api-navigation-breadcrumb__link\"\n [class.active]=\"active\"\n >{{ breadcrumbItem?.displayName }}</a\n>\n<ng-template gioBreadcrumbDynamicHost></ng-template>\n", directives: [{ type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: GioBreadcrumbDynamicItemDirective, selector: "[gioBreadcrumbDynamicHost]" }] });
3567
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbItemComponent, decorators: [{
3568
- type: i0.Component,
3569
- args: [{
3570
- selector: 'gio-breadcrumb-item',
3571
- templateUrl: './gio-breadcrumb-item.component.html',
3572
- }]
3573
- }], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { breadcrumbItem: [{
3574
- type: i0.Input
3575
- }], active: [{
3576
- type: i0.Input
3577
- }], itemClicked: [{
3578
- type: i0.Output
3579
- }], breadcrumbDynamicHost: [{
3580
- type: i0.ViewChild,
3581
- args: [GioBreadcrumbDynamicItemDirective, { static: true }]
3582
- }] } });
3525
+ }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
3583
3526
 
3584
3527
  /*
3585
3528
  * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
@@ -3598,16 +3541,11 @@
3598
3541
  */
3599
3542
  var GioBreadcrumbComponent = /** @class */ (function () {
3600
3543
  function GioBreadcrumbComponent() {
3601
- this.breadcrumbItems = [];
3602
- this.itemClicked = new i0.EventEmitter();
3603
3544
  }
3604
- GioBreadcrumbComponent.prototype.onItemClicked = function ($event) {
3605
- this.itemClicked.emit($event);
3606
- };
3607
3545
  return GioBreadcrumbComponent;
3608
3546
  }());
3609
3547
  GioBreadcrumbComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
3610
- GioBreadcrumbComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioBreadcrumbComponent, selector: "gio-breadcrumb", inputs: { breadcrumbItems: "breadcrumbItems" }, outputs: { itemClicked: "itemClicked" }, 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 class=\"gio-breadcrumb\">\n <span *ngFor=\"let breadcrumbItem of this.breadcrumbItems; index as breadcrumbItemIndex\" class=\"gio-breadcrumb__content\">\n <gio-breadcrumb-item [breadcrumbItem]=\"breadcrumbItem\" (itemClicked)=\"onItemClicked($event)\"></gio-breadcrumb-item>\n <mat-icon\n *ngIf=\"breadcrumbItemIndex < this.breadcrumbItems.length - 1\"\n svgIcon=\"gio:nav-arrow-right\"\n class=\"gio-breadcrumb__icon\"\n ></mat-icon>\n </span>\n</div>\n", styles: [".gio-breadcrumb{display:flex;align-items:center;margin:2px}.gio-breadcrumb__content{display:flex;align-items:center;color:#606274}.gio-breadcrumb__content:last-child{font-weight:bold}.gio-breadcrumb__icon{width:12px;height:12px;margin:0 6px;color:#bbbcc4;line-height:12px}\n"], components: [{ type: GioBreadcrumbItemComponent, selector: "gio-breadcrumb-item", inputs: ["breadcrumbItem", "active"], outputs: ["itemClicked"] }, { type: i1__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3548
+ GioBreadcrumbComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioBreadcrumbComponent, selector: "gio-breadcrumb", queries: [{ propertyName: "itemDirectives", predicate: GioBreadcrumbItemDirective }], 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 class=\"gio-breadcrumb\">-->\n<!-- <span *ngFor=\"let breadcrumbItem of this.breadcrumbItems; index as breadcrumbItemIndex\" class=\"gio-breadcrumb__content\">-->\n<!-- <gio-breadcrumb-item [breadcrumbItem]=\"breadcrumbItem\" (itemClicked)=\"onItemClicked($event)\"></gio-breadcrumb-item>-->\n<!-- <mat-icon-->\n<!-- *ngIf=\"breadcrumbItemIndex < this.breadcrumbItems.length - 1\"-->\n<!-- svgIcon=\"gio:nav-arrow-right\"-->\n<!-- class=\"gio-breadcrumb__icon\"-->\n<!-- ></mat-icon>-->\n<!-- </span>-->\n<!--</div>-->\n<div class=\"gio-breadcrumb\">\n <ng-container *ngFor=\"let item of itemDirectives; let first = first\">\n <mat-icon *ngIf=\"!first\" svgIcon=\"gio:nav-arrow-right\" class=\"gio-breadcrumb__icon\"></mat-icon>\n <ng-container *ngTemplateOutlet=\"item.templateRef\"></ng-container>\n </ng-container>\n</div>\n", styles: [".gio-breadcrumb{display:flex;align-items:center;margin:2px}.gio-breadcrumb__content{display:flex;align-items:center;color:#606274}.gio-breadcrumb__content:last-child{font-weight:bold}.gio-breadcrumb__icon{width:12px;height:12px;margin:0 6px;color:#bbbcc4;line-height:12px}\n"], components: [{ type: i1__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
3611
3549
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbComponent, decorators: [{
3612
3550
  type: i0.Component,
3613
3551
  args: [{
@@ -3615,10 +3553,9 @@
3615
3553
  templateUrl: './gio-breadcrumb.component.html',
3616
3554
  styleUrls: ['./gio-breadcrumb.component.scss'],
3617
3555
  }]
3618
- }], propDecorators: { breadcrumbItems: [{
3619
- type: i0.Input
3620
- }], itemClicked: [{
3621
- type: i0.Output
3556
+ }], propDecorators: { itemDirectives: [{
3557
+ type: i0.ContentChildren,
3558
+ args: [GioBreadcrumbItemDirective]
3622
3559
  }] } });
3623
3560
 
3624
3561
  /*
@@ -3642,14 +3579,14 @@
3642
3579
  return GioBreadcrumbModule;
3643
3580
  }());
3644
3581
  GioBreadcrumbModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3645
- GioBreadcrumbModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbModule, declarations: [GioBreadcrumbComponent, GioBreadcrumbDynamicItemDirective, GioBreadcrumbItemComponent], imports: [i2$1.CommonModule, GioIconsModule], exports: [GioBreadcrumbComponent, GioBreadcrumbDynamicItemDirective, GioBreadcrumbItemComponent] });
3582
+ GioBreadcrumbModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbModule, declarations: [GioBreadcrumbComponent, GioBreadcrumbItemDirective], imports: [i2$1.CommonModule, GioIconsModule], exports: [GioBreadcrumbComponent, GioBreadcrumbItemDirective] });
3646
3583
  GioBreadcrumbModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbModule, imports: [[i2$1.CommonModule, GioIconsModule]] });
3647
3584
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioBreadcrumbModule, decorators: [{
3648
3585
  type: i0.NgModule,
3649
3586
  args: [{
3650
3587
  imports: [i2$1.CommonModule, GioIconsModule],
3651
- declarations: [GioBreadcrumbComponent, GioBreadcrumbDynamicItemDirective, GioBreadcrumbItemComponent],
3652
- exports: [GioBreadcrumbComponent, GioBreadcrumbDynamicItemDirective, GioBreadcrumbItemComponent],
3588
+ declarations: [GioBreadcrumbComponent, GioBreadcrumbItemDirective],
3589
+ exports: [GioBreadcrumbComponent, GioBreadcrumbItemDirective],
3653
3590
  entryComponents: [GioBreadcrumbComponent],
3654
3591
  }]
3655
3592
  }] });
@@ -3717,8 +3654,7 @@
3717
3654
  exports.GioBannerSuccessComponent = GioBannerSuccessComponent;
3718
3655
  exports.GioBannerWarningComponent = GioBannerWarningComponent;
3719
3656
  exports.GioBreadcrumbComponent = GioBreadcrumbComponent;
3720
- exports.GioBreadcrumbDynamicItemDirective = GioBreadcrumbDynamicItemDirective;
3721
- exports.GioBreadcrumbItemComponent = GioBreadcrumbItemComponent;
3657
+ exports.GioBreadcrumbItemDirective = GioBreadcrumbItemDirective;
3722
3658
  exports.GioBreadcrumbModule = GioBreadcrumbModule;
3723
3659
  exports.GioConfirmAndValidateDialogComponent = GioConfirmAndValidateDialogComponent;
3724
3660
  exports.GioConfirmAndValidateDialogHarness = GioConfirmAndValidateDialogHarness;