cps-ui-kit 0.39.0 → 0.41.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,344 @@ 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.containerClass = '';
3383
+ this.menuShown = new EventEmitter();
3384
+ this.menuHidden = new EventEmitter();
3385
+ this.withIcons = true;
3386
+ this.autoZIndex = true;
3387
+ this.baseZIndex = 0;
3388
+ this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
3389
+ this.hideTransitionOptions = '.1s linear';
3390
+ this.dismissable = true;
3391
+ this.overlayVisible = false;
3392
+ this.render = false;
3393
+ this.isOverlayAnimationInProgress = false;
3394
+ this.selfClick = false;
3395
+ }
3396
+ toggle(event, target) {
3397
+ if (this.isOverlayAnimationInProgress) {
3398
+ return;
3399
+ }
3400
+ if (this.overlayVisible) {
3401
+ if (this.hasTargetChanged(event, target)) {
3402
+ this.destroyCallback = () => {
3403
+ this.show(null, target || event.currentTarget || event.target);
3404
+ };
3405
+ }
3406
+ this.hide();
3407
+ }
3408
+ else {
3409
+ this.show(event, target);
3410
+ }
3411
+ }
3412
+ show(event, target) {
3413
+ target && event && event.stopPropagation();
3414
+ if (this.isOverlayAnimationInProgress) {
3415
+ return;
3416
+ }
3417
+ this.target = target || event.currentTarget || event.target;
3418
+ this.overlayVisible = true;
3419
+ this.render = true;
3420
+ this.cd.markForCheck();
3421
+ }
3422
+ hide() {
3423
+ this.overlayVisible = false;
3424
+ this.cd.markForCheck();
3425
+ }
3426
+ onItemClick(event, item) {
3427
+ if (item.disabled)
3428
+ return;
3429
+ if (item.action) {
3430
+ item.action({
3431
+ originalEvent: event,
3432
+ item
3433
+ });
3434
+ }
3435
+ this.hide();
3436
+ }
3437
+ bindDocumentClickListener() {
3438
+ if (isPlatformBrowser(this.platformId)) {
3439
+ if (!this.documentClickListener && this.dismissable) {
3440
+ this.zone.runOutsideAngular(() => {
3441
+ const documentEvent = DomHandler.isIOS() ? 'touchstart' : 'click';
3442
+ const documentTarget = this.el
3443
+ ? this.el.nativeElement.ownerDocument
3444
+ : this.document;
3445
+ this.documentClickListener = this.renderer.listen(documentTarget, documentEvent, (event) => {
3446
+ if (!this.container?.contains(event.target) &&
3447
+ this.target !== event.target &&
3448
+ !this.target.contains(event.target) &&
3449
+ !this.selfClick) {
3450
+ this.zone.run(() => {
3451
+ this.hide();
3452
+ });
3453
+ }
3454
+ this.selfClick = false;
3455
+ this.cd.markForCheck();
3456
+ });
3457
+ });
3458
+ }
3459
+ }
3460
+ }
3461
+ unbindDocumentClickListener() {
3462
+ if (this.documentClickListener) {
3463
+ this.documentClickListener();
3464
+ this.documentClickListener = null;
3465
+ this.selfClick = false;
3466
+ }
3467
+ }
3468
+ onOverlayClick(event) {
3469
+ this.overlayService.add({
3470
+ originalEvent: event,
3471
+ target: this.el.nativeElement
3472
+ });
3473
+ this.selfClick = true;
3474
+ }
3475
+ onContentClick() {
3476
+ this.selfClick = true;
3477
+ }
3478
+ hasTargetChanged(event, target) {
3479
+ return (this.target != null &&
3480
+ this.target !== (target || event.currentTarget || event.target));
3481
+ }
3482
+ appendContainer() {
3483
+ this.renderer.appendChild(this.document.body, this.container);
3484
+ }
3485
+ restoreAppend() {
3486
+ if (this.container) {
3487
+ this.renderer.appendChild(this.el.nativeElement, this.container);
3488
+ }
3489
+ }
3490
+ align() {
3491
+ if (this.autoZIndex) {
3492
+ ZIndexUtils.set('overlay', this.container, this.baseZIndex + this.config.zIndex.overlay);
3493
+ }
3494
+ DomHandler.absolutePosition(this.container, this.target);
3495
+ const containerOffset = DomHandler.getOffset(this.container);
3496
+ const targetOffset = DomHandler.getOffset(this.target);
3497
+ if (this.withArrow) {
3498
+ const borderRadius = this.document.defaultView
3499
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3500
+ ?.getComputedStyle(this.container)
3501
+ ?.getPropertyValue('border-radius') || '0';
3502
+ let arrowLeft = 0;
3503
+ if (containerOffset.left < targetOffset.left) {
3504
+ arrowLeft =
3505
+ 20 +
3506
+ targetOffset.left -
3507
+ containerOffset.left -
3508
+ parseFloat(borderRadius) * 2;
3509
+ }
3510
+ else {
3511
+ const containerWidth = this.container?.offsetWidth || 0;
3512
+ const targetWidth = this.target?.offsetWidth || 0;
3513
+ arrowLeft = Math.min(targetWidth / 2, containerWidth / 2);
3514
+ }
3515
+ arrowLeft = Math.max(arrowLeft, 12);
3516
+ this.container?.style.setProperty('--overlayArrowLeft', `${arrowLeft}px`);
3517
+ }
3518
+ if (containerOffset.top < targetOffset.top) {
3519
+ DomHandler.addClass(this.container, 'cps-menu-container-flipped');
3520
+ }
3521
+ }
3522
+ onAnimationStart(event) {
3523
+ if (event.toState === 'open') {
3524
+ if (this.compressed)
3525
+ this.withIcons = this.items.some((itm) => itm.icon);
3526
+ this.container = event.element;
3527
+ this.appendContainer();
3528
+ this.align();
3529
+ this.bindDocumentClickListener();
3530
+ this.bindDocumentResizeListener();
3531
+ this.bindScrollListener();
3532
+ if (this.focusOnShow) {
3533
+ this.focus();
3534
+ }
3535
+ this.overlayEventListener = (e) => {
3536
+ if (this.container && this.container.contains(e.target)) {
3537
+ this.selfClick = true;
3538
+ }
3539
+ };
3540
+ this.overlaySubscription = this.overlayService.clickObservable.subscribe(this.overlayEventListener);
3541
+ this.menuShown.emit(null);
3542
+ }
3543
+ this.isOverlayAnimationInProgress = true;
3544
+ }
3545
+ onAnimationEnd(event) {
3546
+ switch (event.toState) {
3547
+ case 'void':
3548
+ if (this.destroyCallback) {
3549
+ this.destroyCallback();
3550
+ this.destroyCallback = null;
3551
+ }
3552
+ if (this.overlaySubscription) {
3553
+ this.overlaySubscription.unsubscribe();
3554
+ }
3555
+ break;
3556
+ case 'close':
3557
+ if (this.autoZIndex) {
3558
+ ZIndexUtils.clear(this.container);
3559
+ }
3560
+ if (this.overlaySubscription) {
3561
+ this.overlaySubscription.unsubscribe();
3562
+ }
3563
+ this.onContainerDestroy();
3564
+ this.menuHidden.emit({});
3565
+ this.render = false;
3566
+ break;
3567
+ }
3568
+ this.isOverlayAnimationInProgress = false;
3569
+ }
3570
+ focus() {
3571
+ const focusable = DomHandler.findSingle(this.container, '[autofocus]');
3572
+ if (focusable) {
3573
+ this.zone.runOutsideAngular(() => {
3574
+ setTimeout(() => focusable.focus(), 5);
3575
+ });
3576
+ }
3577
+ }
3578
+ onWindowResize() {
3579
+ if (this.overlayVisible && !DomHandler.isTouchDevice()) {
3580
+ this.hide();
3581
+ }
3582
+ }
3583
+ bindDocumentResizeListener() {
3584
+ if (isPlatformBrowser(this.platformId)) {
3585
+ if (!this.documentResizeListener) {
3586
+ const window = this.document.defaultView;
3587
+ this.documentResizeListener = this.renderer.listen(window, 'resize', this.onWindowResize.bind(this));
3588
+ }
3589
+ }
3590
+ }
3591
+ unbindDocumentResizeListener() {
3592
+ if (this.documentResizeListener) {
3593
+ this.documentResizeListener();
3594
+ this.documentResizeListener = null;
3595
+ }
3596
+ }
3597
+ bindScrollListener() {
3598
+ if (isPlatformBrowser(this.platformId)) {
3599
+ if (!this.scrollHandler) {
3600
+ this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {
3601
+ if (this.overlayVisible) {
3602
+ this.hide();
3603
+ }
3604
+ });
3605
+ }
3606
+ this.scrollHandler.bindScrollListener();
3607
+ }
3608
+ }
3609
+ unbindScrollListener() {
3610
+ if (this.scrollHandler) {
3611
+ this.scrollHandler.unbindScrollListener();
3612
+ }
3613
+ }
3614
+ onContainerDestroy() {
3615
+ if (!this.cd.destroyed) {
3616
+ this.target = null;
3617
+ }
3618
+ this.unbindDocumentClickListener();
3619
+ this.unbindDocumentResizeListener();
3620
+ this.unbindScrollListener();
3621
+ }
3622
+ ngOnDestroy() {
3623
+ if (this.scrollHandler) {
3624
+ this.scrollHandler.destroy();
3625
+ this.scrollHandler = null;
3626
+ }
3627
+ if (this.container && this.autoZIndex) {
3628
+ ZIndexUtils.clear(this.container);
3629
+ }
3630
+ if (!this.cd.destroyed) {
3631
+ this.target = null;
3632
+ }
3633
+ this.destroyCallback = null;
3634
+ if (this.container) {
3635
+ this.restoreAppend();
3636
+ this.onContainerDestroy();
3637
+ }
3638
+ if (this.overlaySubscription) {
3639
+ this.overlaySubscription.unsubscribe();
3640
+ }
3641
+ }
3642
+ }
3643
+ 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 });
3644
+ 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", containerClass: "containerClass" }, 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 [class]=\"containerClass\"\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: [
3645
+ trigger('animation', [
3646
+ state('void', style({
3647
+ transform: 'scaleY(0.8)',
3648
+ opacity: 0
3649
+ })),
3650
+ state('close', style({
3651
+ opacity: 0
3652
+ })),
3653
+ state('open', style({
3654
+ transform: 'translateY(0)',
3655
+ opacity: 1
3656
+ })),
3657
+ transition('void => open', animate('{{showTransitionParams}}')),
3658
+ transition('open => close', animate('{{hideTransitionParams}}'))
3659
+ ])
3660
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsMenuComponent, decorators: [{
3662
+ type: Component,
3663
+ args: [{ standalone: true, imports: [CommonModule, SharedModule, CpsIconComponent], selector: 'cps-menu', animations: [
3664
+ trigger('animation', [
3665
+ state('void', style({
3666
+ transform: 'scaleY(0.8)',
3667
+ opacity: 0
3668
+ })),
3669
+ state('close', style({
3670
+ opacity: 0
3671
+ })),
3672
+ state('open', style({
3673
+ transform: 'translateY(0)',
3674
+ opacity: 1
3675
+ })),
3676
+ transition('void => open', animate('{{showTransitionParams}}')),
3677
+ transition('open => close', animate('{{hideTransitionParams}}'))
3678
+ ])
3679
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n *ngIf=\"render\"\n class=\"cps-menu-container\"\n [ngClass]=\"{ 'cps-menu-no-arrow': !withArrow }\"\n [class]=\"containerClass\"\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"] }]
3680
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
3681
+ type: Inject,
3682
+ args: [DOCUMENT]
3683
+ }] }, { type: undefined, decorators: [{
3684
+ type: Inject,
3685
+ args: [PLATFORM_ID]
3686
+ }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i4.PrimeNGConfig }, { type: i4.OverlayService }]; }, propDecorators: { header: [{
3687
+ type: Input
3688
+ }], items: [{
3689
+ type: Input
3690
+ }], withArrow: [{
3691
+ type: Input
3692
+ }], compressed: [{
3693
+ type: Input
3694
+ }], focusOnShow: [{
3695
+ type: Input
3696
+ }], containerClass: [{
3697
+ type: Input
3698
+ }], menuShown: [{
3699
+ type: Output
3700
+ }], menuHidden: [{
3701
+ type: Output
3702
+ }] } });
3703
+
3362
3704
  class CpsPaginatorComponent {
3363
3705
  constructor() {
3364
3706
  this.first = 0;
@@ -4074,5 +4416,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
4074
4416
  * Generated bundle index. Do not edit.
4075
4417
  */
4076
4418
 
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 };
4419
+ 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
4420
  //# sourceMappingURL=cps-ui-kit.mjs.map