cps-ui-kit 0.39.0 → 0.40.0

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.
@@ -1,7 +1,7 @@
1
1
  import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
2
+ import { CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, Input, Directive, HostListener, EventEmitter, Self, Optional, Output, ViewChild, Pipe, HostBinding, Host, ContentChild } from '@angular/core';
4
+ import { Component, Input, Directive, HostListener, EventEmitter, Self, Optional, Output, ViewChild, Pipe, HostBinding, Host, ContentChild, PLATFORM_ID, ChangeDetectionStrategy, ViewEncapsulation, Inject } from '@angular/core';
5
5
  import { Subscription } from 'rxjs';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { FormsModule } from '@angular/forms';
@@ -9,10 +9,14 @@ import { isEqual, find } from 'lodash-es';
9
9
  import * as i3 from 'primeng/virtualscroller';
10
10
  import { VirtualScrollerModule } from 'primeng/virtualscroller';
11
11
  import * as i4 from 'primeng/api';
12
+ import { SharedModule } from 'primeng/api';
12
13
  import * as i3$1 from 'primeng/tree';
13
14
  import { TreeModule } from 'primeng/tree';
14
15
  import * as i3$2 from 'primeng/table';
15
16
  import { TableService, Table, TableModule, SortableColumn, SortIcon } from 'primeng/table';
17
+ import { trigger, state, style, transition, animate } from '@angular/animations';
18
+ import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
19
+ import { ZIndexUtils } from 'primeng/utils';
16
20
  import * as i1$1 from 'primeng/paginator';
17
21
  import { PaginatorModule } from 'primeng/paginator';
18
22
  import * as i2$1 from 'primeng/calendar';
@@ -3359,6 +3363,341 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3359
3363
  type: Output
3360
3364
  }] } });
3361
3365
 
3366
+ class CpsMenuComponent {
3367
+ // eslint-disable-next-line no-useless-constructor
3368
+ constructor(document, platformId, el, renderer, cd, zone, config, overlayService) {
3369
+ this.document = document;
3370
+ this.platformId = platformId;
3371
+ this.el = el;
3372
+ this.renderer = renderer;
3373
+ this.cd = cd;
3374
+ this.zone = zone;
3375
+ this.config = config;
3376
+ this.overlayService = overlayService;
3377
+ this.header = '';
3378
+ this.items = [];
3379
+ this.withArrow = true;
3380
+ this.compressed = false; // prepared-colored, without header and items description
3381
+ this.focusOnShow = true;
3382
+ this.menuShown = new EventEmitter();
3383
+ this.menuHidden = new EventEmitter();
3384
+ this.withIcons = true;
3385
+ this.autoZIndex = true;
3386
+ this.baseZIndex = 0;
3387
+ this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
3388
+ this.hideTransitionOptions = '.1s linear';
3389
+ this.dismissable = true;
3390
+ this.overlayVisible = false;
3391
+ this.render = false;
3392
+ this.isOverlayAnimationInProgress = false;
3393
+ this.selfClick = false;
3394
+ }
3395
+ toggle(event, target) {
3396
+ if (this.isOverlayAnimationInProgress) {
3397
+ return;
3398
+ }
3399
+ if (this.overlayVisible) {
3400
+ if (this.hasTargetChanged(event, target)) {
3401
+ this.destroyCallback = () => {
3402
+ this.show(null, target || event.currentTarget || event.target);
3403
+ };
3404
+ }
3405
+ this.hide();
3406
+ }
3407
+ else {
3408
+ this.show(event, target);
3409
+ }
3410
+ }
3411
+ show(event, target) {
3412
+ target && event && event.stopPropagation();
3413
+ if (this.isOverlayAnimationInProgress) {
3414
+ return;
3415
+ }
3416
+ this.target = target || event.currentTarget || event.target;
3417
+ this.overlayVisible = true;
3418
+ this.render = true;
3419
+ this.cd.markForCheck();
3420
+ }
3421
+ hide() {
3422
+ this.overlayVisible = false;
3423
+ this.cd.markForCheck();
3424
+ }
3425
+ onItemClick(event, item) {
3426
+ if (item.disabled)
3427
+ return;
3428
+ if (item.action) {
3429
+ item.action({
3430
+ originalEvent: event,
3431
+ item
3432
+ });
3433
+ }
3434
+ this.hide();
3435
+ }
3436
+ bindDocumentClickListener() {
3437
+ if (isPlatformBrowser(this.platformId)) {
3438
+ if (!this.documentClickListener && this.dismissable) {
3439
+ this.zone.runOutsideAngular(() => {
3440
+ const documentEvent = DomHandler.isIOS() ? 'touchstart' : 'click';
3441
+ const documentTarget = this.el
3442
+ ? this.el.nativeElement.ownerDocument
3443
+ : this.document;
3444
+ this.documentClickListener = this.renderer.listen(documentTarget, documentEvent, (event) => {
3445
+ if (!this.container?.contains(event.target) &&
3446
+ this.target !== event.target &&
3447
+ !this.target.contains(event.target) &&
3448
+ !this.selfClick) {
3449
+ this.zone.run(() => {
3450
+ this.hide();
3451
+ });
3452
+ }
3453
+ this.selfClick = false;
3454
+ this.cd.markForCheck();
3455
+ });
3456
+ });
3457
+ }
3458
+ }
3459
+ }
3460
+ unbindDocumentClickListener() {
3461
+ if (this.documentClickListener) {
3462
+ this.documentClickListener();
3463
+ this.documentClickListener = null;
3464
+ this.selfClick = false;
3465
+ }
3466
+ }
3467
+ onOverlayClick(event) {
3468
+ this.overlayService.add({
3469
+ originalEvent: event,
3470
+ target: this.el.nativeElement
3471
+ });
3472
+ this.selfClick = true;
3473
+ }
3474
+ onContentClick() {
3475
+ this.selfClick = true;
3476
+ }
3477
+ hasTargetChanged(event, target) {
3478
+ return (this.target != null &&
3479
+ this.target !== (target || event.currentTarget || event.target));
3480
+ }
3481
+ appendContainer() {
3482
+ this.renderer.appendChild(this.document.body, this.container);
3483
+ }
3484
+ restoreAppend() {
3485
+ if (this.container) {
3486
+ this.renderer.appendChild(this.el.nativeElement, this.container);
3487
+ }
3488
+ }
3489
+ align() {
3490
+ if (this.autoZIndex) {
3491
+ ZIndexUtils.set('overlay', this.container, this.baseZIndex + this.config.zIndex.overlay);
3492
+ }
3493
+ DomHandler.absolutePosition(this.container, this.target);
3494
+ const containerOffset = DomHandler.getOffset(this.container);
3495
+ const targetOffset = DomHandler.getOffset(this.target);
3496
+ if (this.withArrow) {
3497
+ const borderRadius = this.document.defaultView
3498
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3499
+ ?.getComputedStyle(this.container)
3500
+ ?.getPropertyValue('border-radius') || '0';
3501
+ let arrowLeft = 0;
3502
+ if (containerOffset.left < targetOffset.left) {
3503
+ arrowLeft =
3504
+ 20 +
3505
+ targetOffset.left -
3506
+ containerOffset.left -
3507
+ parseFloat(borderRadius) * 2;
3508
+ }
3509
+ else {
3510
+ const containerWidth = this.container?.offsetWidth || 0;
3511
+ const targetWidth = this.target?.offsetWidth || 0;
3512
+ arrowLeft = Math.min(targetWidth / 2, containerWidth / 2);
3513
+ }
3514
+ arrowLeft = Math.max(arrowLeft, 12);
3515
+ this.container?.style.setProperty('--overlayArrowLeft', `${arrowLeft}px`);
3516
+ }
3517
+ if (containerOffset.top < targetOffset.top) {
3518
+ DomHandler.addClass(this.container, 'cps-menu-container-flipped');
3519
+ }
3520
+ }
3521
+ onAnimationStart(event) {
3522
+ if (event.toState === 'open') {
3523
+ if (this.compressed)
3524
+ this.withIcons = this.items.some((itm) => itm.icon);
3525
+ this.container = event.element;
3526
+ this.appendContainer();
3527
+ this.align();
3528
+ this.bindDocumentClickListener();
3529
+ this.bindDocumentResizeListener();
3530
+ this.bindScrollListener();
3531
+ if (this.focusOnShow) {
3532
+ this.focus();
3533
+ }
3534
+ this.overlayEventListener = (e) => {
3535
+ if (this.container && this.container.contains(e.target)) {
3536
+ this.selfClick = true;
3537
+ }
3538
+ };
3539
+ this.overlaySubscription = this.overlayService.clickObservable.subscribe(this.overlayEventListener);
3540
+ this.menuShown.emit(null);
3541
+ }
3542
+ this.isOverlayAnimationInProgress = true;
3543
+ }
3544
+ onAnimationEnd(event) {
3545
+ switch (event.toState) {
3546
+ case 'void':
3547
+ if (this.destroyCallback) {
3548
+ this.destroyCallback();
3549
+ this.destroyCallback = null;
3550
+ }
3551
+ if (this.overlaySubscription) {
3552
+ this.overlaySubscription.unsubscribe();
3553
+ }
3554
+ break;
3555
+ case 'close':
3556
+ if (this.autoZIndex) {
3557
+ ZIndexUtils.clear(this.container);
3558
+ }
3559
+ if (this.overlaySubscription) {
3560
+ this.overlaySubscription.unsubscribe();
3561
+ }
3562
+ this.onContainerDestroy();
3563
+ this.menuHidden.emit({});
3564
+ this.render = false;
3565
+ break;
3566
+ }
3567
+ this.isOverlayAnimationInProgress = false;
3568
+ }
3569
+ focus() {
3570
+ const focusable = DomHandler.findSingle(this.container, '[autofocus]');
3571
+ if (focusable) {
3572
+ this.zone.runOutsideAngular(() => {
3573
+ setTimeout(() => focusable.focus(), 5);
3574
+ });
3575
+ }
3576
+ }
3577
+ onWindowResize() {
3578
+ if (this.overlayVisible && !DomHandler.isTouchDevice()) {
3579
+ this.hide();
3580
+ }
3581
+ }
3582
+ bindDocumentResizeListener() {
3583
+ if (isPlatformBrowser(this.platformId)) {
3584
+ if (!this.documentResizeListener) {
3585
+ const window = this.document.defaultView;
3586
+ this.documentResizeListener = this.renderer.listen(window, 'resize', this.onWindowResize.bind(this));
3587
+ }
3588
+ }
3589
+ }
3590
+ unbindDocumentResizeListener() {
3591
+ if (this.documentResizeListener) {
3592
+ this.documentResizeListener();
3593
+ this.documentResizeListener = null;
3594
+ }
3595
+ }
3596
+ bindScrollListener() {
3597
+ if (isPlatformBrowser(this.platformId)) {
3598
+ if (!this.scrollHandler) {
3599
+ this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {
3600
+ if (this.overlayVisible) {
3601
+ this.hide();
3602
+ }
3603
+ });
3604
+ }
3605
+ this.scrollHandler.bindScrollListener();
3606
+ }
3607
+ }
3608
+ unbindScrollListener() {
3609
+ if (this.scrollHandler) {
3610
+ this.scrollHandler.unbindScrollListener();
3611
+ }
3612
+ }
3613
+ onContainerDestroy() {
3614
+ if (!this.cd.destroyed) {
3615
+ this.target = null;
3616
+ }
3617
+ this.unbindDocumentClickListener();
3618
+ this.unbindDocumentResizeListener();
3619
+ this.unbindScrollListener();
3620
+ }
3621
+ ngOnDestroy() {
3622
+ if (this.scrollHandler) {
3623
+ this.scrollHandler.destroy();
3624
+ this.scrollHandler = null;
3625
+ }
3626
+ if (this.container && this.autoZIndex) {
3627
+ ZIndexUtils.clear(this.container);
3628
+ }
3629
+ if (!this.cd.destroyed) {
3630
+ this.target = null;
3631
+ }
3632
+ this.destroyCallback = null;
3633
+ if (this.container) {
3634
+ this.restoreAppend();
3635
+ this.onContainerDestroy();
3636
+ }
3637
+ if (this.overlaySubscription) {
3638
+ this.overlaySubscription.unsubscribe();
3639
+ }
3640
+ }
3641
+ }
3642
+ CpsMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsMenuComponent, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i4.PrimeNGConfig }, { token: i4.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
3643
+ CpsMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsMenuComponent, isStandalone: true, selector: "cps-menu", inputs: { header: "header", items: "items", withArrow: "withArrow", compressed: "compressed", focusOnShow: "focusOnShow" }, outputs: { menuShown: "menuShown", menuHidden: "menuHidden" }, ngImport: i0, template: "<div\n *ngIf=\"render\"\n class=\"cps-menu-container\"\n [ngClass]=\"{ 'cps-menu-no-arrow': !withArrow }\"\n (click)=\"onOverlayClick($event)\"\n [@animation]=\"{\n value: overlayVisible ? 'open' : 'close',\n params: {\n showTransitionParams: showTransitionOptions,\n hideTransitionParams: hideTransitionOptions\n }\n }\"\n (@animation.start)=\"onAnimationStart($event)\"\n (@animation.done)=\"onAnimationEnd($event)\">\n <div (click)=\"onContentClick()\" (mousedown)=\"onContentClick()\">\n <ng-container *ngIf=\"items.length < 1\">\n <ng-content></ng-content>\n </ng-container>\n <div\n *ngIf=\"items.length > 0\"\n class=\"cps-menu-content\"\n [ngClass]=\"{ 'cps-menu-content-compressed': compressed }\">\n <div *ngIf=\"header && !compressed\" class=\"cps-menu-header\">\n {{ header }}\n </div>\n <div\n *ngFor=\"let item of items; let i = index\"\n (click)=\"onItemClick($event, item)\"\n [ngClass]=\"{\n 'cps-menu-item-disabled': item.disabled,\n 'cps-menu-item-first': i === 0,\n 'cps-menu-item-compressed': compressed\n }\"\n class=\"cps-menu-item\">\n <div class=\"cps-menu-item-icon\" *ngIf=\"withIcons\">\n <cps-icon\n *ngIf=\"item.icon\"\n [icon]=\"item.icon\"\n [color]=\"item.disabled ? 'text-light' : 'text-dark'\"\n [size]=\"compressed ? 'small' : 'normal'\"></cps-icon>\n </div>\n <div class=\"cps-menu-item-content\">\n <span class=\"cps-menu-item-content-title\">{{ item.title }}</span>\n <span\n *ngIf=\"item.desc && !compressed\"\n class=\"cps-menu-item-content-desc\"\n >{{ item.desc }}</span\n >\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".cps-menu-container{background:#ffffff;border:0 none;box-shadow:0 1px 3px #0000004d;position:absolute;margin-top:14px;top:0;left:0}.cps-menu-container:not(.cps-menu-no-arrow):before{border-width:14px;margin-left:-14px;border:solid transparent;border-color:#fff0;border-bottom-color:var(--cps-color-line-light)}.cps-menu-container:not(.cps-menu-no-arrow):after,.cps-menu-container:not(.cps-menu-no-arrow):before{bottom:100%;left:var(--overlayArrowLeft, 12);content:\" \";height:0;width:0;position:absolute;pointer-events:none}.cps-menu-container .cps-menu-content{padding:.75rem}.cps-menu-container .cps-menu-content{display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}.cps-menu-container .cps-menu-content .cps-menu-header{display:flex;align-items:center;min-height:50px;padding-bottom:8px;font-weight:600;color:var(--cps-color-text-dark);cursor:default}.cps-menu-container .cps-menu-content .cps-menu-item{display:flex;align-items:center;padding:8px 48px 8px 0;border-top:1px solid rgba(0,0,0,.1215686275);cursor:pointer;min-height:58px}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-icon{width:48px;align-items:center;display:flex}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-icon cps-icon{margin-left:8px}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-content{display:flex;flex-direction:column}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-content .cps-menu-item-content-title{font-weight:600;font-size:15px;line-height:150%;color:var(--cps-color-text-dark)}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-content .cps-menu-item-content-desc{font-size:12px;line-height:150%;color:var(--cps-color-text-light)}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-disabled{pointer-events:none}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-disabled .cps-menu-item-content .cps-menu-item-content-title{color:var(--cps-color-text-light)}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-disabled .cps-menu-item-content .cps-menu-item-content-desc{color:var(--cps-color-text-lightest)}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):hover{background:#f8f4f5}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):hover .cps-menu-item-content .cps-menu-item-content-title{color:var(--cps-color-calm)}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):hover .cps-menu-item-content .cps-menu-item-content-desc{color:var(--cps-color-text-mild)}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):not(.cps-menu-item-compressed):hover .cps-menu-item-icon cps-icon i{color:var(--cps-color-calm)!important}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):active{background:#f1eaec}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-first{border-top:none}.cps-menu-container .cps-menu-content.cps-menu-content-compressed{padding:0}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item{padding:0 16px;min-height:40px}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item .cps-menu-item-icon{width:36px}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item .cps-menu-item-content .cps-menu-item-content-title{font-weight:500}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item:not(.cps-menu-item-disabled) .cps-menu-item-icon cps-icon i{color:var(--cps-color-prepared)!important}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item:not(.cps-menu-item-disabled) .cps-menu-item-content .cps-menu-item-content-title{color:var(--cps-color-prepared)}.cps-menu-container:not(.cps-menu-no-arrow):after{border-width:12px;margin-left:-12px;border:solid transparent;border-color:#fff0;border-bottom-color:#fff}.cps-menu-container-flipped{margin-top:0;margin-bottom:10px}.cps-menu-container:not(.cps-menu-no-arrow):after{border-width:12px;margin-left:-12px}.cps-menu-container:not(.cps-menu-no-arrow):before{border-width:14px;margin-left:-14px}.cps-menu-container-flipped:not(.cps-menu-no-arrow):after,.cps-menu-container-flipped:not(.cps-menu-no-arrow):before{bottom:auto;top:100%}.cps-menu-container.cps-menu-container-flipped:not(.cps-menu-no-arrow):after{border-bottom-color:transparent}.cps-menu-container.cps-menu-container-flipped:not(.cps-menu-no-arrow):before{border-bottom-color:transparent}.cps-menu-no-arrow{margin-top:0;margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }], animations: [
3644
+ trigger('animation', [
3645
+ state('void', style({
3646
+ transform: 'scaleY(0.8)',
3647
+ opacity: 0
3648
+ })),
3649
+ state('close', style({
3650
+ opacity: 0
3651
+ })),
3652
+ state('open', style({
3653
+ transform: 'translateY(0)',
3654
+ opacity: 1
3655
+ })),
3656
+ transition('void => open', animate('{{showTransitionParams}}')),
3657
+ transition('open => close', animate('{{hideTransitionParams}}'))
3658
+ ])
3659
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsMenuComponent, decorators: [{
3661
+ type: Component,
3662
+ args: [{ standalone: true, imports: [CommonModule, SharedModule, CpsIconComponent], selector: 'cps-menu', animations: [
3663
+ trigger('animation', [
3664
+ state('void', style({
3665
+ transform: 'scaleY(0.8)',
3666
+ opacity: 0
3667
+ })),
3668
+ state('close', style({
3669
+ opacity: 0
3670
+ })),
3671
+ state('open', style({
3672
+ transform: 'translateY(0)',
3673
+ opacity: 1
3674
+ })),
3675
+ transition('void => open', animate('{{showTransitionParams}}')),
3676
+ transition('open => close', animate('{{hideTransitionParams}}'))
3677
+ ])
3678
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n *ngIf=\"render\"\n class=\"cps-menu-container\"\n [ngClass]=\"{ 'cps-menu-no-arrow': !withArrow }\"\n (click)=\"onOverlayClick($event)\"\n [@animation]=\"{\n value: overlayVisible ? 'open' : 'close',\n params: {\n showTransitionParams: showTransitionOptions,\n hideTransitionParams: hideTransitionOptions\n }\n }\"\n (@animation.start)=\"onAnimationStart($event)\"\n (@animation.done)=\"onAnimationEnd($event)\">\n <div (click)=\"onContentClick()\" (mousedown)=\"onContentClick()\">\n <ng-container *ngIf=\"items.length < 1\">\n <ng-content></ng-content>\n </ng-container>\n <div\n *ngIf=\"items.length > 0\"\n class=\"cps-menu-content\"\n [ngClass]=\"{ 'cps-menu-content-compressed': compressed }\">\n <div *ngIf=\"header && !compressed\" class=\"cps-menu-header\">\n {{ header }}\n </div>\n <div\n *ngFor=\"let item of items; let i = index\"\n (click)=\"onItemClick($event, item)\"\n [ngClass]=\"{\n 'cps-menu-item-disabled': item.disabled,\n 'cps-menu-item-first': i === 0,\n 'cps-menu-item-compressed': compressed\n }\"\n class=\"cps-menu-item\">\n <div class=\"cps-menu-item-icon\" *ngIf=\"withIcons\">\n <cps-icon\n *ngIf=\"item.icon\"\n [icon]=\"item.icon\"\n [color]=\"item.disabled ? 'text-light' : 'text-dark'\"\n [size]=\"compressed ? 'small' : 'normal'\"></cps-icon>\n </div>\n <div class=\"cps-menu-item-content\">\n <span class=\"cps-menu-item-content-title\">{{ item.title }}</span>\n <span\n *ngIf=\"item.desc && !compressed\"\n class=\"cps-menu-item-content-desc\"\n >{{ item.desc }}</span\n >\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".cps-menu-container{background:#ffffff;border:0 none;box-shadow:0 1px 3px #0000004d;position:absolute;margin-top:14px;top:0;left:0}.cps-menu-container:not(.cps-menu-no-arrow):before{border-width:14px;margin-left:-14px;border:solid transparent;border-color:#fff0;border-bottom-color:var(--cps-color-line-light)}.cps-menu-container:not(.cps-menu-no-arrow):after,.cps-menu-container:not(.cps-menu-no-arrow):before{bottom:100%;left:var(--overlayArrowLeft, 12);content:\" \";height:0;width:0;position:absolute;pointer-events:none}.cps-menu-container .cps-menu-content{padding:.75rem}.cps-menu-container .cps-menu-content{display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}.cps-menu-container .cps-menu-content .cps-menu-header{display:flex;align-items:center;min-height:50px;padding-bottom:8px;font-weight:600;color:var(--cps-color-text-dark);cursor:default}.cps-menu-container .cps-menu-content .cps-menu-item{display:flex;align-items:center;padding:8px 48px 8px 0;border-top:1px solid rgba(0,0,0,.1215686275);cursor:pointer;min-height:58px}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-icon{width:48px;align-items:center;display:flex}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-icon cps-icon{margin-left:8px}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-content{display:flex;flex-direction:column}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-content .cps-menu-item-content-title{font-weight:600;font-size:15px;line-height:150%;color:var(--cps-color-text-dark)}.cps-menu-container .cps-menu-content .cps-menu-item .cps-menu-item-content .cps-menu-item-content-desc{font-size:12px;line-height:150%;color:var(--cps-color-text-light)}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-disabled{pointer-events:none}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-disabled .cps-menu-item-content .cps-menu-item-content-title{color:var(--cps-color-text-light)}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-disabled .cps-menu-item-content .cps-menu-item-content-desc{color:var(--cps-color-text-lightest)}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):hover{background:#f8f4f5}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):hover .cps-menu-item-content .cps-menu-item-content-title{color:var(--cps-color-calm)}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):hover .cps-menu-item-content .cps-menu-item-content-desc{color:var(--cps-color-text-mild)}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):not(.cps-menu-item-compressed):hover .cps-menu-item-icon cps-icon i{color:var(--cps-color-calm)!important}.cps-menu-container .cps-menu-content .cps-menu-item:not(.cps-menu-item-disabled):active{background:#f1eaec}.cps-menu-container .cps-menu-content .cps-menu-item.cps-menu-item-first{border-top:none}.cps-menu-container .cps-menu-content.cps-menu-content-compressed{padding:0}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item{padding:0 16px;min-height:40px}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item .cps-menu-item-icon{width:36px}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item .cps-menu-item-content .cps-menu-item-content-title{font-weight:500}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item:not(.cps-menu-item-disabled) .cps-menu-item-icon cps-icon i{color:var(--cps-color-prepared)!important}.cps-menu-container .cps-menu-content.cps-menu-content-compressed .cps-menu-item:not(.cps-menu-item-disabled) .cps-menu-item-content .cps-menu-item-content-title{color:var(--cps-color-prepared)}.cps-menu-container:not(.cps-menu-no-arrow):after{border-width:12px;margin-left:-12px;border:solid transparent;border-color:#fff0;border-bottom-color:#fff}.cps-menu-container-flipped{margin-top:0;margin-bottom:10px}.cps-menu-container:not(.cps-menu-no-arrow):after{border-width:12px;margin-left:-12px}.cps-menu-container:not(.cps-menu-no-arrow):before{border-width:14px;margin-left:-14px}.cps-menu-container-flipped:not(.cps-menu-no-arrow):after,.cps-menu-container-flipped:not(.cps-menu-no-arrow):before{bottom:auto;top:100%}.cps-menu-container.cps-menu-container-flipped:not(.cps-menu-no-arrow):after{border-bottom-color:transparent}.cps-menu-container.cps-menu-container-flipped:not(.cps-menu-no-arrow):before{border-bottom-color:transparent}.cps-menu-no-arrow{margin-top:0;margin-bottom:0}\n"] }]
3679
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
3680
+ type: Inject,
3681
+ args: [DOCUMENT]
3682
+ }] }, { type: undefined, decorators: [{
3683
+ type: Inject,
3684
+ args: [PLATFORM_ID]
3685
+ }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i4.PrimeNGConfig }, { type: i4.OverlayService }]; }, propDecorators: { header: [{
3686
+ type: Input
3687
+ }], items: [{
3688
+ type: Input
3689
+ }], withArrow: [{
3690
+ type: Input
3691
+ }], compressed: [{
3692
+ type: Input
3693
+ }], focusOnShow: [{
3694
+ type: Input
3695
+ }], menuShown: [{
3696
+ type: Output
3697
+ }], menuHidden: [{
3698
+ type: Output
3699
+ }] } });
3700
+
3362
3701
  class CpsPaginatorComponent {
3363
3702
  constructor() {
3364
3703
  this.first = 0;
@@ -4074,5 +4413,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
4074
4413
  * Generated bundle index. Do not edit.
4075
4414
  */
4076
4415
 
4077
- export { CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsDatepickerComponent, CpsExpansionPanelComponent, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsSelectComponent, CpsTableColumnSortableDirective, CpsTableComponent, CpsTagComponent, CpsTextareaComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory };
4416
+ export { CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsDatepickerComponent, CpsExpansionPanelComponent, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsSelectComponent, CpsTableColumnSortableDirective, CpsTableComponent, CpsTagComponent, CpsTextareaComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory };
4078
4417
  //# sourceMappingURL=cps-ui-kit.mjs.map