@pepperi-addons/ngx-lib 0.4.2-beta.320 → 0.4.2-beta.321

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.
@@ -25,17 +25,22 @@ class PepTopBarComponent {
25
25
  this.isHidden = true;
26
26
  this.searchIsOpenAndSmallDevice = false;
27
27
  this.PepScreenSizeType = PepScreenSizeType;
28
- this.__pepLifecyclePhase = 'constructor';
29
28
  this.__pepViewReady = false;
29
+ this._footerOwnerSeq = 0;
30
30
  }
31
31
  ngAfterViewInit() {
32
- this.__pepLifecyclePhase = 'ngAfterViewInit';
33
32
  setTimeout(() => {
34
33
  if (!this.inline) {
35
- this.hasFooterContent =
36
- this.footerStartContent?.nativeElement?.children?.length > 0 ||
37
- this.footerEndContent?.nativeElement?.children?.length > 0;
34
+ const startLen = this.footerStartContent?.nativeElement?.children?.length ?? -1;
35
+ const endLen = this.footerEndContent?.nativeElement?.children?.length ?? -1;
36
+ this.hasFooterContent = startLen > 0 || endLen > 0;
38
37
  }
38
+ // Mark view ready BEFORE subscribing so that cdRef.detectChanges() runs
39
+ // inside setFooterState() before footerStateChange is emitted on the
40
+ // first (synchronous) BehaviorSubject emission. Without this, Angular's
41
+ // DOM is not updated before the React wrapper queries .footer on SPA navigation.
42
+ this.isHidden = false;
43
+ this.__pepViewReady = true;
39
44
  this.layoutService.onResize$.subscribe((size) => {
40
45
  this.screenSize = size;
41
46
  this.setSearchIsOpenAndSmallDevice();
@@ -43,15 +48,12 @@ class PepTopBarComponent {
43
48
  this.setFooterState();
44
49
  }
45
50
  });
46
- this.isHidden = false;
47
- this.__pepViewReady = true;
48
51
  if (this.cdRef && this.__pepViewReady) {
49
52
  this.cdRef.detectChanges();
50
53
  }
51
54
  });
52
55
  }
53
56
  ngAfterContentInit() {
54
- this.__pepLifecyclePhase = 'ngAfterContentInit';
55
57
  if (this.searchComp) {
56
58
  this.searchComp.stateChange
57
59
  .subscribe((searchStateChangeEvent) => {
@@ -63,7 +65,7 @@ class PepTopBarComponent {
63
65
  }
64
66
  ngOnDestroy() {
65
67
  if (this.customizationService) {
66
- this.customizationService.hideFooter();
68
+ this.customizationService.hideFooter(this._footerOwnerSeq);
67
69
  }
68
70
  }
69
71
  setSearchIsOpenAndSmallDevice() {
@@ -84,18 +86,19 @@ class PepTopBarComponent {
84
86
  this.footerStateChange.emit({ state: this.footerState });
85
87
  if (this.footerState === 'visible') {
86
88
  this.customizationService.showFooter();
89
+ this._footerOwnerSeq = this.customizationService.footerOwnerSeq;
87
90
  }
88
91
  else {
89
- this.customizationService.hideFooter();
92
+ this.customizationService.hideFooter(this._footerOwnerSeq);
90
93
  }
91
94
  }
92
95
  }
93
96
  }
94
97
  PepTopBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTopBarComponent, deps: [{ token: i1.PepCustomizationService }, { token: i1.PepLayoutService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
95
- PepTopBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepTopBarComponent, selector: "pep-top-bar", inputs: { inline: "inline", title: "title" }, outputs: { footerStateChange: "footerStateChange" }, queries: [{ propertyName: "searchComp", first: true, predicate: PepSearchComponent, descendants: true }, { propertyName: "listActionsComp", first: true, predicate: PepListActionsComponent, descendants: true }, { propertyName: "listChooserComp", first: true, predicate: PepListChooserComponent, descendants: true }, { propertyName: "listTotalComp", first: true, predicate: PepListTotalComponent, descendants: true }, { propertyName: "listSortingComp", first: true, predicate: PepListSortingComponent, descendants: true }, { propertyName: "listViewsComp", first: true, predicate: PepListViewsComponent, descendants: true }], viewQueries: [{ propertyName: "footerStartContent", first: true, predicate: ["footerStartContent"], descendants: true }, { propertyName: "footerEndContent", first: true, predicate: ["footerEndContent"], descendants: true }], ngImport: i0, template: "<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title ellipsis {{ inline ? 'title-md' : 'title-lg' }} \"\n [ngClass]=\"{ 'md-max-title-width': screenSize === PepScreenSizeType.MD, 'sm-max-title-width': screenSize >= PepScreenSizeType.SM }\"\n >\n <span class=\"ellipsis\" [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>", styles: [".pep-top-bar-container{display:grid;height:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:101}.pep-top-bar-container .title{display:inline-flex!important;align-items:center;justify-content:center}.pep-top-bar-container .title.md-max-title-width{max-width:300px}.pep-top-bar-container .title.sm-max-title-width{max-width:180px}.pep-top-bar-container .header-content{height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));margin-top:var(--pep-top-bar-spacing-top, 1.5rem)}.pep-top-bar-container .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container .header-content .main-layout .content{display:flex;justify-content:space-between;height:inherit}.pep-top-bar-container .header-content .main-layout .content .left-container,.pep-top-bar-container .header-content .main-layout .content .right-container{height:inherit}.pep-top-bar-container .footer{position:fixed;bottom:0;left:0;right:0;height:var(--pep-footer-bar-height, 4.5rem);z-index:101}.pep-top-bar-container .footer .content{display:flex;justify-content:space-between;margin-inline:calc(var(--pep-spacing-lg, 1rem) * 2);padding-top:var(--pep-footer-bar-spacing-top, .75rem)}@media (max-width: 599px){.pep-top-bar-container .footer .content{margin-inline:var(--pep-spacing-lg, 1rem)}}.pep-top-bar-container .left-container{display:flex}.pep-top-bar-container .right-container{display:flex;justify-content:flex-end}.pep-top-bar-container .flex-wrapper ::ng-deep>*{display:flex}.pep-top-bar-container .list-actions-wrapper ::ng-deep .pep-button{margin-right:var(--pep-spacing-xs, .25rem);margin-left:var(--pep-spacing-xs, .25rem)}.pep-top-bar-container:not(.inline) ::ng-deep .pepperi-button,.pep-top-bar-container:not(.inline) ::ng-deep .pep-button,.pep-top-bar-container:not(.inline) .pepperi-button,.pep-top-bar-container:not(.inline) .pep-button{height:var(--pep-top-bar-field-height, 2.5rem);line-height:var(--pep-top-bar-field-height, 2.5rem)}.pep-top-bar-container.inline{position:inherit;height:var(--pep-top-bar-field-height, 2.5rem);width:100%}.pep-top-bar-container.inline .header-content{margin-top:0;height:inherit;padding:0;position:inherit;width:inherit}.pep-top-bar-container.inline .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container.inline .header-content .main-layout .content{height:inherit;margin:0}\n", ".pep-top-bar-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-top-bar-container .footer{background-color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PepRtlDirectionDirective, selector: "[pepRtlDirection]" }] });
98
+ PepTopBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepTopBarComponent, selector: "pep-top-bar", inputs: { inline: "inline", title: "title" }, outputs: { footerStateChange: "footerStateChange" }, queries: [{ propertyName: "searchComp", first: true, predicate: PepSearchComponent, descendants: true }, { propertyName: "listActionsComp", first: true, predicate: PepListActionsComponent, descendants: true }, { propertyName: "listChooserComp", first: true, predicate: PepListChooserComponent, descendants: true }, { propertyName: "listTotalComp", first: true, predicate: PepListTotalComponent, descendants: true }, { propertyName: "listSortingComp", first: true, predicate: PepListSortingComponent, descendants: true }, { propertyName: "listViewsComp", first: true, predicate: PepListViewsComponent, descendants: true }], viewQueries: [{ propertyName: "footerStartContent", first: true, predicate: ["footerStartContent"], descendants: true }, { propertyName: "footerEndContent", first: true, predicate: ["footerEndContent"], descendants: true }], ngImport: i0, template: "<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions-element\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title ellipsis {{ inline ? 'title-md' : 'title-lg' }} \"\n [ngClass]=\"{ 'md-max-title-width': screenSize === PepScreenSizeType.MD, 'sm-max-title-width': screenSize >= PepScreenSizeType.SM }\"\n >\n <span class=\"ellipsis\" [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>", styles: [".pep-top-bar-container{display:grid;height:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:101}.pep-top-bar-container .title{display:inline-flex!important;align-items:center;justify-content:center}.pep-top-bar-container .title.md-max-title-width{max-width:300px}.pep-top-bar-container .title.sm-max-title-width{max-width:180px}.pep-top-bar-container .header-content{height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));margin-top:var(--pep-top-bar-spacing-top, 1.5rem)}.pep-top-bar-container .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container .header-content .main-layout .content{display:flex;justify-content:space-between;height:inherit}.pep-top-bar-container .header-content .main-layout .content .left-container,.pep-top-bar-container .header-content .main-layout .content .right-container{height:inherit}.pep-top-bar-container .footer{position:fixed;bottom:0;left:0;right:0;height:var(--pep-footer-bar-height, 4.5rem);z-index:101}.pep-top-bar-container .footer .content{display:flex;justify-content:space-between;margin-inline:calc(var(--pep-spacing-lg, 1rem) * 2);padding-top:var(--pep-footer-bar-spacing-top, .75rem)}@media (max-width: 599px){.pep-top-bar-container .footer .content{margin-inline:var(--pep-spacing-lg, 1rem)}}.pep-top-bar-container .left-container{display:flex}.pep-top-bar-container .right-container{display:flex;justify-content:flex-end}.pep-top-bar-container .flex-wrapper ::ng-deep>*{display:flex}.pep-top-bar-container .list-actions-wrapper ::ng-deep .pep-button{margin-right:var(--pep-spacing-xs, .25rem);margin-left:var(--pep-spacing-xs, .25rem)}.pep-top-bar-container:not(.inline) ::ng-deep .pepperi-button,.pep-top-bar-container:not(.inline) ::ng-deep .pep-button,.pep-top-bar-container:not(.inline) .pepperi-button,.pep-top-bar-container:not(.inline) .pep-button{height:var(--pep-top-bar-field-height, 2.5rem);line-height:var(--pep-top-bar-field-height, 2.5rem)}.pep-top-bar-container.inline{position:inherit;height:var(--pep-top-bar-field-height, 2.5rem);width:100%}.pep-top-bar-container.inline .header-content{margin-top:0;height:inherit;padding:0;position:inherit;width:inherit}.pep-top-bar-container.inline .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container.inline .header-content .main-layout .content{height:inherit;margin:0}\n", ".pep-top-bar-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-top-bar-container .footer{background-color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PepRtlDirectionDirective, selector: "[pepRtlDirection]" }] });
96
99
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepTopBarComponent, decorators: [{
97
100
  type: Component,
98
- args: [{ selector: 'pep-top-bar', template: "<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title ellipsis {{ inline ? 'title-md' : 'title-lg' }} \"\n [ngClass]=\"{ 'md-max-title-width': screenSize === PepScreenSizeType.MD, 'sm-max-title-width': screenSize >= PepScreenSizeType.SM }\"\n >\n <span class=\"ellipsis\" [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>", styles: [".pep-top-bar-container{display:grid;height:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:101}.pep-top-bar-container .title{display:inline-flex!important;align-items:center;justify-content:center}.pep-top-bar-container .title.md-max-title-width{max-width:300px}.pep-top-bar-container .title.sm-max-title-width{max-width:180px}.pep-top-bar-container .header-content{height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));margin-top:var(--pep-top-bar-spacing-top, 1.5rem)}.pep-top-bar-container .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container .header-content .main-layout .content{display:flex;justify-content:space-between;height:inherit}.pep-top-bar-container .header-content .main-layout .content .left-container,.pep-top-bar-container .header-content .main-layout .content .right-container{height:inherit}.pep-top-bar-container .footer{position:fixed;bottom:0;left:0;right:0;height:var(--pep-footer-bar-height, 4.5rem);z-index:101}.pep-top-bar-container .footer .content{display:flex;justify-content:space-between;margin-inline:calc(var(--pep-spacing-lg, 1rem) * 2);padding-top:var(--pep-footer-bar-spacing-top, .75rem)}@media (max-width: 599px){.pep-top-bar-container .footer .content{margin-inline:var(--pep-spacing-lg, 1rem)}}.pep-top-bar-container .left-container{display:flex}.pep-top-bar-container .right-container{display:flex;justify-content:flex-end}.pep-top-bar-container .flex-wrapper ::ng-deep>*{display:flex}.pep-top-bar-container .list-actions-wrapper ::ng-deep .pep-button{margin-right:var(--pep-spacing-xs, .25rem);margin-left:var(--pep-spacing-xs, .25rem)}.pep-top-bar-container:not(.inline) ::ng-deep .pepperi-button,.pep-top-bar-container:not(.inline) ::ng-deep .pep-button,.pep-top-bar-container:not(.inline) .pepperi-button,.pep-top-bar-container:not(.inline) .pep-button{height:var(--pep-top-bar-field-height, 2.5rem);line-height:var(--pep-top-bar-field-height, 2.5rem)}.pep-top-bar-container.inline{position:inherit;height:var(--pep-top-bar-field-height, 2.5rem);width:100%}.pep-top-bar-container.inline .header-content{margin-top:0;height:inherit;padding:0;position:inherit;width:inherit}.pep-top-bar-container.inline .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container.inline .header-content .main-layout .content{height:inherit;margin:0}\n", ".pep-top-bar-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-top-bar-container .footer{background-color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}\n"] }]
101
+ args: [{ selector: 'pep-top-bar', template: "<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions-element\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title ellipsis {{ inline ? 'title-md' : 'title-lg' }} \"\n [ngClass]=\"{ 'md-max-title-width': screenSize === PepScreenSizeType.MD, 'sm-max-title-width': screenSize >= PepScreenSizeType.SM }\"\n >\n <span class=\"ellipsis\" [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>", styles: [".pep-top-bar-container{display:grid;height:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:101}.pep-top-bar-container .title{display:inline-flex!important;align-items:center;justify-content:center}.pep-top-bar-container .title.md-max-title-width{max-width:300px}.pep-top-bar-container .title.sm-max-title-width{max-width:180px}.pep-top-bar-container .header-content{height:calc(var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));margin-top:var(--pep-top-bar-spacing-top, 1.5rem)}.pep-top-bar-container .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container .header-content .main-layout .content{display:flex;justify-content:space-between;height:inherit}.pep-top-bar-container .header-content .main-layout .content .left-container,.pep-top-bar-container .header-content .main-layout .content .right-container{height:inherit}.pep-top-bar-container .footer{position:fixed;bottom:0;left:0;right:0;height:var(--pep-footer-bar-height, 4.5rem);z-index:101}.pep-top-bar-container .footer .content{display:flex;justify-content:space-between;margin-inline:calc(var(--pep-spacing-lg, 1rem) * 2);padding-top:var(--pep-footer-bar-spacing-top, .75rem)}@media (max-width: 599px){.pep-top-bar-container .footer .content{margin-inline:var(--pep-spacing-lg, 1rem)}}.pep-top-bar-container .left-container{display:flex}.pep-top-bar-container .right-container{display:flex;justify-content:flex-end}.pep-top-bar-container .flex-wrapper ::ng-deep>*{display:flex}.pep-top-bar-container .list-actions-wrapper ::ng-deep .pep-button{margin-right:var(--pep-spacing-xs, .25rem);margin-left:var(--pep-spacing-xs, .25rem)}.pep-top-bar-container:not(.inline) ::ng-deep .pepperi-button,.pep-top-bar-container:not(.inline) ::ng-deep .pep-button,.pep-top-bar-container:not(.inline) .pepperi-button,.pep-top-bar-container:not(.inline) .pep-button{height:var(--pep-top-bar-field-height, 2.5rem);line-height:var(--pep-top-bar-field-height, 2.5rem)}.pep-top-bar-container.inline{position:inherit;height:var(--pep-top-bar-field-height, 2.5rem);width:100%}.pep-top-bar-container.inline .header-content{margin-top:0;height:inherit;padding:0;position:inherit;width:inherit}.pep-top-bar-container.inline .header-content .main-layout{width:inherit;height:inherit;padding:0}.pep-top-bar-container.inline .header-content .main-layout .content{height:inherit;margin:0}\n", ".pep-top-bar-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.pep-top-bar-container .footer{background-color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}\n"] }]
99
102
  }], ctorParameters: function () { return [{ type: i1.PepCustomizationService }, { type: i1.PepLayoutService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { inline: [{
100
103
  type: Input
101
104
  }], title: [{
@@ -1 +1 @@
1
- {"version":3,"file":"pepperi-addons-ngx-lib-top-bar.mjs","sources":["../../../projects/ngx-lib/top-bar/top-bar.component.ts","../../../projects/ngx-lib/top-bar/top-bar.component.html","../../../projects/ngx-lib/top-bar/top-bar.module.ts","../../../projects/ngx-lib/top-bar/public-api.ts","../../../projects/ngx-lib/top-bar/pepperi-addons-ngx-lib-top-bar.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectorRef,\n ContentChild,\n ElementRef,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n PepCustomizationService,\n PepLayoutService,\n PepScreenSizeType,\n} from '@pepperi-addons/ngx-lib';\nimport { PepSearchComponent } from '@pepperi-addons/ngx-lib/search';\nimport {\n PepListActionsComponent,\n PepListChooserComponent,\n PepListSortingComponent,\n PepListTotalComponent,\n PepListViewsComponent,\n} from '@pepperi-addons/ngx-lib/list';\nimport { PepMenuStateType } from '@pepperi-addons/ngx-lib/menu';\nimport {\n IPepSearchStateChangeEvent,\n PepSearchStateType,\n} from '@pepperi-addons/ngx-lib/search';\nimport {\n IPepFooterStateChangeEvent,\n PepFooterStateType,\n} from './top-bar.model';\n\n@Component({\n selector: 'pep-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss', './top-bar.component.theme.scss'],\n})\nexport class PepTopBarComponent implements AfterViewInit, AfterContentInit, OnDestroy {\n @Input() inline = false;\n @Input() title: string = null;\n\n @Output()\n footerStateChange: EventEmitter<IPepFooterStateChangeEvent> = new EventEmitter<IPepFooterStateChangeEvent>();\n\n @ViewChild('footerStartContent') footerStartContent: ElementRef;\n @ViewChild('footerEndContent') footerEndContent: ElementRef;\n\n @ContentChild(PepSearchComponent) searchComp: PepSearchComponent;\n @ContentChild(PepListActionsComponent)\n listActionsComp: PepListActionsComponent;\n @ContentChild(PepListChooserComponent)\n listChooserComp: PepListChooserComponent;\n @ContentChild(PepListTotalComponent) listTotalComp: PepListTotalComponent;\n @ContentChild(PepListSortingComponent)\n listSortingComp: PepListSortingComponent;\n @ContentChild(PepListViewsComponent) listViewsComp: PepListViewsComponent;\n\n hasFooterContent = null;\n isHidden = true;\n screenSize: PepScreenSizeType;\n // listActionsIsVisible = false;\n searchState: PepSearchStateType;\n searchIsOpenAndSmallDevice = false;\n footerState: PepFooterStateType;\n PepScreenSizeType = PepScreenSizeType;\n private __pepLifecyclePhase = 'constructor';\n private __pepViewReady = false;\n\n constructor(\n public customizationService: PepCustomizationService,\n public layoutService: PepLayoutService,\n private cdRef: ChangeDetectorRef,\n ) { }\n\n ngAfterViewInit(): void {\n this.__pepLifecyclePhase = 'ngAfterViewInit';\n\n setTimeout(() => {\n if (!this.inline) {\n this.hasFooterContent =\n this.footerStartContent?.nativeElement?.children?.length > 0 ||\n this.footerEndContent?.nativeElement?.children?.length > 0;\n }\n\n this.layoutService.onResize$.subscribe((size: PepScreenSizeType) => {\n this.screenSize = size;\n this.setSearchIsOpenAndSmallDevice();\n\n if (!this.inline) {\n this.setFooterState();\n }\n });\n\n this.isHidden = false;\n\n this.__pepViewReady = true;\n if (this.cdRef && this.__pepViewReady) {\n this.cdRef.detectChanges();\n }\n });\n }\n\n ngAfterContentInit() {\n this.__pepLifecyclePhase = 'ngAfterContentInit';\n\n if (this.searchComp) {\n this.searchComp.stateChange\n .subscribe(\n (searchStateChangeEvent: IPepSearchStateChangeEvent) => {\n this.searchState = searchStateChangeEvent.state;\n this.setSearchIsOpenAndSmallDevice();\n }\n )\n .unsubscribe();\n }\n }\n\n ngOnDestroy(): void {\n if (this.customizationService) {\n this.customizationService.hideFooter();\n }\n }\n\n private setSearchIsOpenAndSmallDevice(): void {\n // check if search is open and the device size is small or extra small\n this.searchIsOpenAndSmallDevice =\n this.screenSize > PepScreenSizeType.SM &&\n this.searchState === 'open';\n }\n\n private setFooterState() {\n const newFooterState: PepFooterStateType =\n this.hasFooterContent && this.screenSize >= PepScreenSizeType.MD\n ? 'visible'\n : 'hidden';\n\n if (this.footerState !== newFooterState) {\n this.footerState = newFooterState;\n\n if (this.cdRef && this.__pepViewReady) {\n this.cdRef.detectChanges();\n }\n\n this.footerStateChange.emit({ state: this.footerState });\n\n if (this.footerState === 'visible') {\n this.customizationService.showFooter()\n } else {\n this.customizationService.hideFooter()\n }\n }\n }\n}\n","<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title ellipsis {{ inline ? 'title-md' : 'title-lg' }} \"\n [ngClass]=\"{ 'md-max-title-width': screenSize === PepScreenSizeType.MD, 'sm-max-title-width': screenSize >= PepScreenSizeType.SM }\"\n >\n <span class=\"ellipsis\" [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemMenu,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepSearchModule } from '@pepperi-addons/ngx-lib/search';\n\nimport { PepTopBarComponent } from './top-bar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n // Material modules,\n MatCommonModule,\n MatMenuModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepMenuModule,\n PepIconModule,\n PepSearchModule,\n ],\n exports: [PepTopBarComponent],\n declarations: [PepTopBarComponent],\n})\nexport class PepTopBarModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemMenu,\n pepIconSystemEdit,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/top-bar\n */\nexport * from './top-bar.module';\nexport * from './top-bar.component';\nexport * from './top-bar.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;MA2Ca,kBAAkB,CAAA;AA+B3B,IAAA,WAAA,CACW,oBAA6C,EAC7C,aAA+B,EAC9B,KAAwB,EAAA;QAFzB,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;QAC7C,IAAa,CAAA,aAAA,GAAb,aAAa,CAAkB;QAC9B,IAAK,CAAA,KAAA,GAAL,KAAK,CAAmB;QAjC3B,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;QACf,IAAK,CAAA,KAAA,GAAW,IAAI,CAAC;AAG9B,QAAA,IAAA,CAAA,iBAAiB,GAA6C,IAAI,YAAY,EAA8B,CAAC;QAe7G,IAAgB,CAAA,gBAAA,GAAG,IAAI,CAAC;QACxB,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC;QAIhB,IAA0B,CAAA,0BAAA,GAAG,KAAK,CAAC;QAEnC,IAAiB,CAAA,iBAAA,GAAG,iBAAiB,CAAC;QAC9B,IAAmB,CAAA,mBAAA,GAAG,aAAa,CAAC;QACpC,IAAc,CAAA,cAAA,GAAG,KAAK,CAAC;KAM1B;IAEL,eAAe,GAAA;AACX,QAAA,IAAI,CAAC,mBAAmB,GAAG,iBAAiB,CAAC;QAE7C,UAAU,CAAC,MAAK;AACZ,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AACd,gBAAA,IAAI,CAAC,gBAAgB;oBACjB,IAAI,CAAC,kBAAkB,EAAE,aAAa,EAAE,Q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A,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,eAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAFT,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAZ7B,YAAY;;QAEZ,eAAe;QACf,aAAa;QACb,aAAa;;QAEb,eAAe;QACf,aAAa;QACb,aAAa;AACb,QAAA,eAAe,aAET,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGnB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAdpB,YAAY;;QAEZ,eAAe;QACf,aAAa;QACb,aAAa;;QAEb,eAAe;QACf,aAAa;QACb,aAAa;QACb,eAAe,CAAA,EAAA,CAAA,CAAA;2FAKV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;;wBAEZ,eAAe;wBACf,aAAa;wBACb,aAAa;;wBAEb,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,eAAe;AAClB,qBAAA;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;AACrC,iBAAA,CAAA;;;AClCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"pepperi-addons-ngx-lib-top-bar.mjs","sources":["../../../projects/ngx-lib/top-bar/top-bar.component.ts","../../../projects/ngx-lib/top-bar/top-bar.component.html","../../../projects/ngx-lib/top-bar/top-bar.module.ts","../../../projects/ngx-lib/top-bar/public-api.ts","../../../projects/ngx-lib/top-bar/pepperi-addons-ngx-lib-top-bar.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectorRef,\n ContentChild,\n ElementRef,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n PepCustomizationService,\n PepLayoutService,\n PepScreenSizeType,\n} from '@pepperi-addons/ngx-lib';\nimport { PepSearchComponent } from '@pepperi-addons/ngx-lib/search';\nimport {\n PepListActionsComponent,\n PepListChooserComponent,\n PepListSortingComponent,\n PepListTotalComponent,\n PepListViewsComponent,\n} from '@pepperi-addons/ngx-lib/list';\nimport { PepMenuStateType } from '@pepperi-addons/ngx-lib/menu';\nimport {\n IPepSearchStateChangeEvent,\n PepSearchStateType,\n} from '@pepperi-addons/ngx-lib/search';\nimport {\n IPepFooterStateChangeEvent,\n PepFooterStateType,\n} from './top-bar.model';\n\n@Component({\n selector: 'pep-top-bar',\n templateUrl: './top-bar.component.html',\n styleUrls: ['./top-bar.component.scss', './top-bar.component.theme.scss'],\n})\nexport class PepTopBarComponent implements AfterViewInit, AfterContentInit, OnDestroy {\n @Input() inline = false;\n @Input() title: string = null;\n\n @Output()\n footerStateChange: EventEmitter<IPepFooterStateChangeEvent> = new EventEmitter<IPepFooterStateChangeEvent>();\n\n @ViewChild('footerStartContent') footerStartContent: ElementRef;\n @ViewChild('footerEndContent') footerEndContent: ElementRef;\n\n @ContentChild(PepSearchComponent) searchComp: PepSearchComponent;\n @ContentChild(PepListActionsComponent)\n listActionsComp: PepListActionsComponent;\n @ContentChild(PepListChooserComponent)\n listChooserComp: PepListChooserComponent;\n @ContentChild(PepListTotalComponent) listTotalComp: PepListTotalComponent;\n @ContentChild(PepListSortingComponent)\n listSortingComp: PepListSortingComponent;\n @ContentChild(PepListViewsComponent) listViewsComp: PepListViewsComponent;\n\n hasFooterContent = null;\n isHidden = true;\n screenSize: PepScreenSizeType;\n // listActionsIsVisible = false;\n searchState: PepSearchStateType;\n searchIsOpenAndSmallDevice = false;\n footerState: PepFooterStateType;\n PepScreenSizeType = PepScreenSizeType;\n private __pepViewReady = false;\n private _footerOwnerSeq = 0;\n\n constructor(\n public customizationService: PepCustomizationService,\n public layoutService: PepLayoutService,\n private cdRef: ChangeDetectorRef,\n ) { }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n if (!this.inline) {\n const startLen = this.footerStartContent?.nativeElement?.children?.length ?? -1;\n const endLen = this.footerEndContent?.nativeElement?.children?.length ?? -1;\n this.hasFooterContent = startLen > 0 || endLen > 0;\n }\n\n // Mark view ready BEFORE subscribing so that cdRef.detectChanges() runs\n // inside setFooterState() before footerStateChange is emitted on the\n // first (synchronous) BehaviorSubject emission. Without this, Angular's\n // DOM is not updated before the React wrapper queries .footer on SPA navigation.\n this.isHidden = false;\n this.__pepViewReady = true;\n\n this.layoutService.onResize$.subscribe((size: PepScreenSizeType) => {\n this.screenSize = size;\n this.setSearchIsOpenAndSmallDevice();\n\n if (!this.inline) {\n this.setFooterState();\n }\n });\n\n if (this.cdRef && this.__pepViewReady) {\n this.cdRef.detectChanges();\n }\n });\n }\n\n ngAfterContentInit() {\n\n if (this.searchComp) {\n this.searchComp.stateChange\n .subscribe(\n (searchStateChangeEvent: IPepSearchStateChangeEvent) => {\n this.searchState = searchStateChangeEvent.state;\n this.setSearchIsOpenAndSmallDevice();\n }\n )\n .unsubscribe();\n }\n }\n\n ngOnDestroy(): void {\n if (this.customizationService) {\n this.customizationService.hideFooter(this._footerOwnerSeq);\n }\n }\n\n private setSearchIsOpenAndSmallDevice(): void {\n // check if search is open and the device size is small or extra small\n this.searchIsOpenAndSmallDevice =\n this.screenSize > PepScreenSizeType.SM &&\n this.searchState === 'open';\n }\n\n private setFooterState() {\n const newFooterState: PepFooterStateType =\n this.hasFooterContent && this.screenSize >= PepScreenSizeType.MD\n ? 'visible'\n : 'hidden';\n\n if (this.footerState !== newFooterState) {\n this.footerState = newFooterState;\n\n if (this.cdRef && this.__pepViewReady) {\n this.cdRef.detectChanges();\n }\n\n this.footerStateChange.emit({ state: this.footerState });\n\n if (this.footerState === 'visible') {\n this.customizationService.showFooter();\n this._footerOwnerSeq = this.customizationService.footerOwnerSeq;\n } else {\n this.customizationService.hideFooter(this._footerOwnerSeq);\n }\n }\n }\n}\n","<div pepRtlDirection [hidden]=\"isHidden\" class=\"pep-top-bar-container\" [ngClass]=\"{ inline: inline }\">\n <div class=\"header-content\">\n <div class=\"main-layout\">\n <div class=\"content pep-border-bottom\">\n <div class=\"left-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"listActionsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listChooserTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"leftContentTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"listTotalTemplate\"></ng-container>\n </div>\n <div class=\"pep-spacing-element\"></div>\n <div class=\"right-container pep-spacing-element-negative\">\n <ng-container *ngTemplateOutlet=\"searchTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"sortingTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"viewsTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"rightContentTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <!-- hasFooterContent === null is for the first load to see if there is data in the (footer-start-content || footer-end-content). -->\n <div *ngIf=\"hasFooterContent === null || (hasFooterContent && footerState === 'visible')\" class=\"footer\"\n [style.height.rem]=\"customizationService.footerHeight\">\n <div class=\"content pep-border-top\">\n <div #footerStartContent class=\"left-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-start-content]\"></ng-content>\n </div>\n <div #footerEndContent class=\"right-container pep-spacing-element-negative flex-wrapper\">\n <ng-content select=\"[footer-end-content]\"></ng-content>\n </div>\n </div>\n <!-- <ng-container *ngIf=\"showFooter && screenSize >= PepScreenSizeType.MD; then footerBlock; else noFooterBlock\">\n </ng-container>\n <ng-template #footerBlock>\n {{ customizationService.showFooter() }}\n </ng-template>\n <ng-template #noFooterBlock>\n {{ customizationService.hideFooter() }}\n </ng-template> -->\n </div>\n\n</div>\n\n<!-- Left side templates -->\n<ng-template #listActionsTemplate>\n <div class=\"list-actions-wrapper\">\n <ng-content *ngIf=\"!searchIsOpenAndSmallDevice\" select=\"pep-list-actions-element\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #titleTemplate>\n <div *ngIf=\"title?.length > 0\" class=\"pep-spacing-element title ellipsis {{ inline ? 'title-md' : 'title-lg' }} \"\n [ngClass]=\"{ 'md-max-title-width': screenSize === PepScreenSizeType.MD, 'sm-max-title-width': screenSize >= PepScreenSizeType.SM }\"\n >\n <span class=\"ellipsis\" [title]=\"title\">{{ title }}</span>\n </div>\n</ng-template>\n\n<ng-template #listChooserTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listChooserComp }\">\n <ng-content select=\"pep-list-chooser\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #leftContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-start-content]\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #listTotalTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listTotalComp }\">\n <ng-content select=\"pep-list-total\"></ng-content>\n </div>\n</ng-template>\n\n<!-- Right side templates -->\n<ng-template #searchTemplate>\n <div [ngClass]=\"{ 'pep-spacing-element': searchComp }\">\n <ng-content select=\"pep-search\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortingTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listSortingComp }\">\n <ng-content select=\"pep-list-sorting\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #viewsTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" [ngClass]=\"{ 'pep-spacing-element': listViewsComp }\" class=\"flex-wrapper\">\n <ng-content select=\"pep-list-views\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #rightContentTemplate>\n <div *ngIf=\"!searchIsOpenAndSmallDevice\" class=\"flex-wrapper\">\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemMenu,\n pepIconSystemEdit,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepSearchModule } from '@pepperi-addons/ngx-lib/search';\n\nimport { PepTopBarComponent } from './top-bar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n // Material modules,\n MatCommonModule,\n MatMenuModule,\n MatIconModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepMenuModule,\n PepIconModule,\n PepSearchModule,\n ],\n exports: [PepTopBarComponent],\n declarations: [PepTopBarComponent],\n})\nexport class PepTopBarModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemMenu,\n pepIconSystemEdit,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/top-bar\n */\nexport * from './top-bar.module';\nexport * from './top-bar.component';\nexport * from './top-bar.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;MA2Ca,kBAAkB,CAAA;AA+B3B,IAAA,WAAA,CACW,oBAA6C,EAC7C,aAA+B,EAC9B,KAAwB,EAAA;QAFzB,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAyB;QAC7C,IAAa,CAAA,aAAA,GAAb,aAAa,CAAkB;QAC9B,IAAK,CAAA,KAAA,GAAL,KAAK,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,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAdpB,YAAY;;QAEZ,eAAe;QACf,aAAa;QACb,aAAa;;QAEb,eAAe;QACf,aAAa;QACb,aAAa;QACb,eAAe,CAAA,EAAA,CAAA,CAAA;2FAKV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;;wBAEZ,eAAe;wBACf,aAAa;wBACb,aAAa;;wBAEb,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,eAAe;AAClB,qBAAA;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;AACrC,iBAAA,CAAA;;;AClCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -458,14 +458,19 @@ class PepUtilitiesService {
458
458
  if (!isDateTime) {
459
459
  const index = dateStr.indexOf('T');
460
460
  if (index > 0) {
461
- dateStr = dateStr.substring(0, index);
461
+ // Full UTC timestamp: use local date getters to derive the correct local calendar
462
+ // date. Stripping the T-prefix and parsing literally yields the UTC calendar date,
463
+ // which is one day behind for UTC+ users (e.g. NZ UTC+12).
464
+ retVal = new Date(retVal.getFullYear(), retVal.getMonth(), retVal.getDate(), 0, retVal.getTimezoneOffset() * -1);
462
465
  }
463
- const dateText = dateStr.split('-');
464
- if (dateText.length === 3) {
465
- const year = Number(dateText[0]);
466
- const month = Number(dateText[1]) - 1;
467
- const day = Number(dateText[2]);
468
- retVal = new Date(year, month, day, 0, retVal.getTimezoneOffset() * -1);
466
+ else {
467
+ const dateText = dateStr.split('-');
468
+ if (dateText.length === 3) {
469
+ const year = Number(dateText[0]);
470
+ const month = Number(dateText[1]) - 1;
471
+ const day = Number(dateText[2]);
472
+ retVal = new Date(year, month, day, 0, retVal.getTimezoneOffset() * -1);
473
+ }
469
474
  }
470
475
  }
471
476
  else {
@@ -1798,9 +1803,15 @@ class PepCustomizationService {
1798
1803
  this.mainContHeight = 0;
1799
1804
  this.footerHeight = new BehaviorSubject(0);
1800
1805
  this.settingsWidth = new BehaviorSubject(0);
1806
+ // Monotonically-increasing sequence number for footer ownership.
1807
+ // showFooter() increments it; hideFooter(seq) is a no-op if the stored
1808
+ // seq is newer, preventing old ngOnDestroy calls from overriding a newer
1809
+ // showFooter() during SPA navigation with React startTransition.
1810
+ this._footerOwnerSeq = 0;
1801
1811
  this.hideFooter();
1802
1812
  //
1803
1813
  }
1814
+ get footerOwnerSeq() { return this._footerOwnerSeq; }
1804
1815
  getDefaultFromGroup(field, withValidators = true) {
1805
1816
  const validators = withValidators ? field.getValidators() : [];
1806
1817
  const group = {};
@@ -2338,10 +2349,15 @@ class PepCustomizationService {
2338
2349
  }
2339
2350
  document.documentElement.style.setProperty(PepCustomizationService.FOOTER_HEIGHT_KEY, height + PepCustomizationService.REM_STRING);
2340
2351
  }
2341
- hideFooter() {
2352
+ hideFooter(expectedSeq) {
2353
+ if (expectedSeq !== undefined && expectedSeq !== this._footerOwnerSeq) {
2354
+ // A newer showFooter() was called after us — don't override it.
2355
+ return;
2356
+ }
2342
2357
  this.setFooterHeight(0);
2343
2358
  }
2344
2359
  showFooter() {
2360
+ this._footerOwnerSeq++;
2345
2361
  const themeVars = this.getThemeVariables();
2346
2362
  const res = this.getNumberThemeVariable(themeVars, PepCustomizationService.FOOTER_BAR_SPACING_TOP_KEY) +
2347
2363
  this.getNumberThemeVariable(themeVars, PepCustomizationService.FOOTER_BAR_SPACING_BOTTOM_KEY) +