@cuby-ui/core 0.0.231 → 0.0.232

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/components/banner/banner.component.d.ts +1 -2
  2. package/components/button/button.component.d.ts +1 -1
  3. package/components/sidebar/sidebar-header/sidebar-header.component.d.ts +1 -1
  4. package/components/sidebar/sidebar-navigation-item/sidebar-navigation-item.component.d.ts +1 -1
  5. package/directives/tooltip/tooltip.component.d.ts +1 -1
  6. package/esm2022/components/banner/banner.component.mjs +3 -3
  7. package/esm2022/utils/default-validators/create-default-validators.mjs +2 -2
  8. package/esm2022/utils/default-validators/index.mjs +2 -2
  9. package/esm2022/widgets/categories/components/category-form/category-form.component.mjs +3 -3
  10. package/esm2022/widgets/checklist-block/checklist-block.component.mjs +72 -0
  11. package/esm2022/widgets/checklist-block/checklist-block.options.mjs +2 -0
  12. package/esm2022/widgets/checklist-block/components/checklist-block-list/checklist-block-list.component.mjs +85 -0
  13. package/esm2022/widgets/checklist-block/components/checklist-block-list/index.mjs +2 -0
  14. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-card/checklist-block-list-item-action-card.component.mjs +133 -0
  15. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-card/index.mjs +2 -0
  16. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/checklist-block-list-item-action-with-verification.component.mjs +45 -0
  17. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/index.mjs +2 -0
  18. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/checklist-block-list-item-action-without-verification.component.mjs +35 -0
  19. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/index.mjs +2 -0
  20. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.component.mjs +152 -0
  21. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.options.mjs +2 -0
  22. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-container/index.mjs +2 -0
  23. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.component.mjs +282 -0
  24. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.options.mjs +2 -0
  25. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation/index.mjs +2 -0
  26. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.component.mjs +117 -0
  27. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.options.mjs +2 -0
  28. package/esm2022/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/index.mjs +2 -0
  29. package/esm2022/widgets/checklist-block/components/checklist-block-title-control/checklist-block-title-control.component.mjs +39 -0
  30. package/esm2022/widgets/checklist-block/components/checklist-block-title-control/index.mjs +2 -0
  31. package/esm2022/widgets/checklist-block/components/index.mjs +2 -0
  32. package/esm2022/widgets/checklist-block/index.mjs +2 -0
  33. package/esm2022/widgets/checklist-block/services/checklist-block.service.mjs +50 -0
  34. package/esm2022/widgets/checklist-block/services/index.mjs +2 -0
  35. package/esm2022/widgets/delete-modal/delete-modal.component.mjs +39 -0
  36. package/esm2022/widgets/delete-modal/delete-modal.options.mjs +2 -0
  37. package/esm2022/widgets/delete-modal/index.mjs +2 -0
  38. package/esm2022/widgets/index.mjs +6 -2
  39. package/esm2022/widgets/loader/index.mjs +2 -0
  40. package/esm2022/widgets/loader/loader.component.mjs +36 -0
  41. package/esm2022/widgets/utility-info/utility-info.component.mjs +4 -4
  42. package/fesm2022/cuby-ui-core.mjs +1182 -234
  43. package/fesm2022/cuby-ui-core.mjs.map +1 -1
  44. package/package.json +3 -3
  45. package/utils/default-validators/create-default-validators.d.ts +1 -1
  46. package/utils/default-validators/index.d.ts +1 -1
  47. package/widgets/categories/components/category-item/category-item.component.d.ts +3 -3
  48. package/widgets/checklist-block/checklist-block.component.d.ts +20 -0
  49. package/widgets/checklist-block/checklist-block.options.d.ts +12 -0
  50. package/widgets/checklist-block/components/checklist-block-list/checklist-block-list.component.d.ts +27 -0
  51. package/widgets/checklist-block/components/checklist-block-list/index.d.ts +1 -0
  52. package/widgets/checklist-block/components/checklist-block-list-item-action-card/checklist-block-list-item-action-card.component.d.ts +30 -0
  53. package/widgets/checklist-block/components/checklist-block-list-item-action-card/index.d.ts +1 -0
  54. package/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/checklist-block-list-item-action-with-verification.component.d.ts +11 -0
  55. package/widgets/checklist-block/components/checklist-block-list-item-action-with-verification/index.d.ts +1 -0
  56. package/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/checklist-block-list-item-action-without-verification.component.d.ts +10 -0
  57. package/widgets/checklist-block/components/checklist-block-list-item-action-without-verification/index.d.ts +1 -0
  58. package/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.component.d.ts +41 -0
  59. package/widgets/checklist-block/components/checklist-block-list-item-container/checklist-block-list-item-container.options.d.ts +5 -0
  60. package/widgets/checklist-block/components/checklist-block-list-item-container/index.d.ts +1 -0
  61. package/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.component.d.ts +51 -0
  62. package/widgets/checklist-block/components/checklist-block-list-item-evaluation/checklist-block-list-item-evaluation.options.d.ts +14 -0
  63. package/widgets/checklist-block/components/checklist-block-list-item-evaluation/index.d.ts +2 -0
  64. package/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.component.d.ts +33 -0
  65. package/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/checklist-block-list-item-evaluation-criteria.options.d.ts +4 -0
  66. package/widgets/checklist-block/components/checklist-block-list-item-evaluation-criteria/index.d.ts +1 -0
  67. package/widgets/checklist-block/components/checklist-block-title-control/checklist-block-title-control.component.d.ts +8 -0
  68. package/widgets/checklist-block/components/checklist-block-title-control/index.d.ts +1 -0
  69. package/widgets/checklist-block/components/index.d.ts +1 -0
  70. package/widgets/checklist-block/index.d.ts +1 -0
  71. package/widgets/checklist-block/services/checklist-block.service.d.ts +19 -0
  72. package/widgets/checklist-block/services/index.d.ts +1 -0
  73. package/widgets/delete-modal/delete-modal.component.d.ts +13 -0
  74. package/widgets/delete-modal/delete-modal.options.d.ts +7 -0
  75. package/widgets/delete-modal/index.d.ts +2 -0
  76. package/widgets/index.d.ts +5 -1
  77. package/widgets/loader/index.d.ts +1 -0
  78. package/widgets/loader/loader.component.d.ts +20 -0
@@ -3,7 +3,7 @@ import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, ef
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor, UpperCasePipe, NgClass } from '@angular/common';
5
5
  import * as i1$1 from '@cuby-ui/cdk';
6
- import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, cuiGetClosestFocusable, CuiTime, CuiDimensionsObserverDirective, CuiAutoResizingDirective, CuiIdService, CuiElementDirective } from '@cuby-ui/cdk';
6
+ import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, cuiGetClosestFocusable, CuiTime, CuiDimensionsObserverDirective, CuiAutoResizingDirective, CuiIdService, CuiElementDirective, CuiDragPointerDirective, CuiDragDropDirective, CuiDragListDirective, CuiHandleScrollDirective } from '@cuby-ui/cdk';
7
7
  import { DomSanitizer } from '@angular/platform-browser';
8
8
  import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
9
9
  import { BehaviorSubject, takeUntil, Observable, merge, distinctUntilChanged, startWith, map, finalize, timer, Subject, switchMap, of, delay, repeat, filter, tap, takeWhile, fromEvent, debounce, skip, take, forkJoin, throttleTime, concatMap, toArray, catchError, throwError, pairwise, debounceTime } from 'rxjs';
@@ -20,10 +20,11 @@ import { MaskitoDirective } from '@maskito/angular';
20
20
  import EditorJS from '@editorjs/editorjs';
21
21
  import Header from '@editorjs/header';
22
22
  import List from '@editorjs/list';
23
- import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
23
+ import * as i2$2 from '@jsverse/transloco';
24
+ import { TranslocoDirective, TranslocoService, TranslocoModule } from '@jsverse/transloco';
24
25
  import { HttpClient, HttpErrorResponse } from '@angular/common/http';
25
26
  import { createCustomElement } from '@angular/elements';
26
- import { CuiFrameApiService, CuiTreeStructNavigatorApiService } from '@cuby-ui/api';
27
+ import { CuiTreeStructNavigatorApiService, CuiFrameApiService, CuiNodeChecklistApiService, CuiTreeStructApiService } from '@cuby-ui/api';
27
28
 
28
29
  class CuiAccordionComponent {
29
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -892,11 +893,11 @@ class CuiBannerComponent {
892
893
  this.closed.emit();
893
894
  }
894
895
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
895
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\n<div class=\"c-wrapper\">\r\n <h2\r\n *ngIf=\"label\"\r\n class=\"c-heading\"\r\n >\r\n {{ label }}\r\n </h2>\r\n <ng-content></ng-content>\r\n <button\r\n cuiButton\r\n *ngIf=\"actionButtonText\"\r\n appearance=\"link\"\r\n class=\"c-action\"\r\n (click)=\"onAction()\"\r\n >\r\n {{ actionButtonText }}\r\n </button>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n *cuiLet=\"theme$ | async as theme\"\r\n icon=\"cuiIconX\"\r\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\r\n />\r\n</button>\r\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
896
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\n<div class=\"c-wrapper\">\r\n <h2\r\n *ngIf=\"label\"\r\n class=\"c-heading\"\r\n >\r\n {{ label }}\r\n </h2>\r\n <ng-content></ng-content>\r\n <button\r\n cuiButton\r\n *ngIf=\"actionButtonText\"\r\n appearance=\"link\"\r\n class=\"c-action\"\r\n (click)=\"onAction()\"\r\n >\r\n {{ actionButtonText }}\r\n </button>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n *cuiLet=\"theme$ | async as theme\"\r\n icon=\"cuiIconX\"\r\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme]\"\r\n />\r\n</button>\r\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
896
897
  }
897
898
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiBannerComponent, decorators: [{
898
899
  type: Component,
899
- args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\n<div class=\"c-wrapper\">\r\n <h2\r\n *ngIf=\"label\"\r\n class=\"c-heading\"\r\n >\r\n {{ label }}\r\n </h2>\r\n <ng-content></ng-content>\r\n <button\r\n cuiButton\r\n *ngIf=\"actionButtonText\"\r\n appearance=\"link\"\r\n class=\"c-action\"\r\n (click)=\"onAction()\"\r\n >\r\n {{ actionButtonText }}\r\n </button>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n *cuiLet=\"theme$ | async as theme\"\r\n icon=\"cuiIconX\"\r\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\r\n />\r\n</button>\r\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"] }]
900
+ args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\n<div class=\"c-wrapper\">\r\n <h2\r\n *ngIf=\"label\"\r\n class=\"c-heading\"\r\n >\r\n {{ label }}\r\n </h2>\r\n <ng-content></ng-content>\r\n <button\r\n cuiButton\r\n *ngIf=\"actionButtonText\"\r\n appearance=\"link\"\r\n class=\"c-action\"\r\n (click)=\"onAction()\"\r\n >\r\n {{ actionButtonText }}\r\n </button>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n *cuiLet=\"theme$ | async as theme\"\r\n icon=\"cuiIconX\"\r\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme]\"\r\n />\r\n</button>\r\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"] }]
900
901
  }], propDecorators: { status: [{
901
902
  type: Input
902
903
  }, {
@@ -1678,7 +1679,7 @@ function syncExtraSpacesValidator() {
1678
1679
  };
1679
1680
  }
1680
1681
 
1681
- function createDefaultValidators({ maxLength = 100, asyncDelay = 700 } = {}) {
1682
+ function cuiCreateDefaultValidators({ maxLength = 100, asyncDelay = 700 } = {}) {
1682
1683
  // Need to offset because this delay must be before changing value
1683
1684
  const OFFSET = 1;
1684
1685
  const adjustedAsyncDelay = asyncDelay - OFFSET;
@@ -7450,246 +7451,65 @@ const cuiLoaderInterceptor = (request, next) => {
7450
7451
  return next(request).pipe(catchError(throwError), finalize(loaderService.handleCompletedRequest.bind(loaderService)));
7451
7452
  };
7452
7453
 
7453
- class CuiGeneralControlErrorHintComponent {
7454
+ class CuiLoaderComponent {
7454
7455
  constructor() {
7455
- this.control = input.required();
7456
- this.isVisible = input();
7456
+ this.loaderService = inject(CuiLoaderService);
7457
+ this.translocoService = inject(TranslocoService);
7458
+ this.state = CuiLoadingState;
7459
+ this.LoaderString = {
7460
+ [CuiLoadingState.LOADING]: `${this.translocoService.translate('SAVING')}...`,
7461
+ [CuiLoadingState.COMPLETED]: this.translocoService.translate('SAVED'),
7462
+ [CuiLoadingState.INITIAL]: ''
7463
+ };
7464
+ this.LoaderIcon = {
7465
+ [CuiLoadingState.LOADING]: 'cuiIconRefreshCcw',
7466
+ [CuiLoadingState.COMPLETED]: 'cuiIconCheck',
7467
+ [CuiLoadingState.INITIAL]: ''
7468
+ };
7469
+ this.loaderState = this.loaderService.loaderState;
7470
+ this.loaderString = computed(() => this.LoaderString[this.loaderState()]);
7471
+ this.loaderIcon = computed(() => this.LoaderIcon[this.loaderState()]);
7457
7472
  }
7458
- get isInvalid() {
7459
- return this.isVisible() ?? (this.control().invalid && this.control().dirty);
7473
+ ngOnDestroy() {
7474
+ this.loaderService.reset();
7460
7475
  }
7461
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiGeneralControlErrorHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7462
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiGeneralControlErrorHintComponent, isStandalone: true, selector: "cui-general-control-error-hint", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n @if (isInvalid) {\r\n @if (control().errors; as errors) {\r\n <cui-hint hintType=\"error\">\r\n @if (errors['required']) {\r\n {{ t('FIELD_IS_REQUIRED') }}\r\n } @else if (errors['maxlength']) {\r\n {{ t('PLEASE_KEEP_FIELD_UNDER_CHARACTERS', { value: errors['maxlength'].requiredLength }) }}\r\n } @else if (errors['extraSpaces']) {\r\n {{ t('MUST_BE_WITHOUT_EXTRA_SPACES') }}\r\n } @else if (errors['min']) {\r\n {{ t('MIN_VALUE_MUST_BE_MORE_THAN', { value: errors['min'].min }) }}\r\n } @else if (errors['max']) {\r\n {{ t('MAX_VALUE_MUST_BE_LESS_THAN', { value: errors['max'].max }) }}\r\n }\r\n </cui-hint>\r\n }\r\n }\r\n</ng-container>\r\n", styles: [":host{display:inline-block}:host:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CuiHintModule }, { kind: "component", type: CuiHintComponent, selector: "cui-hint", inputs: ["hintType"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
7476
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7477
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiLoaderComponent, isStandalone: true, selector: "cui-loader", ngImport: i0, template: "@if (loaderState() !== state.INITIAL) {\r\n <cui-svg\r\n [icon]=\"loaderIcon()\"\r\n color=\"var(--cui-base-500)\"\r\n [class.icon_loading]=\"loaderState() === state.LOADING\"\r\n />\r\n <span>{{ loaderString() }}</span>\r\n}\r\n", styles: [":host{padding:6px 8px;font-weight:500;font-size:12px;line-height:14px;display:flex;align-items:center;gap:6px;color:var(--cui-base-500)}.icon_loading{animation:spin 1s ease-in-out infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7463
7478
  }
7464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiGeneralControlErrorHintComponent, decorators: [{
7479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiLoaderComponent, decorators: [{
7465
7480
  type: Component,
7466
- args: [{ selector: 'cui-general-control-error-hint', imports: [CuiHintModule, TranslocoDirective], standalone: true, changeDetection: ChangeDetectionStrategy.Default, template: "<ng-container *transloco=\"let t\">\r\n @if (isInvalid) {\r\n @if (control().errors; as errors) {\r\n <cui-hint hintType=\"error\">\r\n @if (errors['required']) {\r\n {{ t('FIELD_IS_REQUIRED') }}\r\n } @else if (errors['maxlength']) {\r\n {{ t('PLEASE_KEEP_FIELD_UNDER_CHARACTERS', { value: errors['maxlength'].requiredLength }) }}\r\n } @else if (errors['extraSpaces']) {\r\n {{ t('MUST_BE_WITHOUT_EXTRA_SPACES') }}\r\n } @else if (errors['min']) {\r\n {{ t('MIN_VALUE_MUST_BE_MORE_THAN', { value: errors['min'].min }) }}\r\n } @else if (errors['max']) {\r\n {{ t('MAX_VALUE_MUST_BE_LESS_THAN', { value: errors['max'].max }) }}\r\n }\r\n </cui-hint>\r\n }\r\n }\r\n</ng-container>\r\n", styles: [":host{display:inline-block}:host:empty{display:none}\n"] }]
7481
+ args: [{ selector: 'cui-loader', imports: [CuiSvgModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (loaderState() !== state.INITIAL) {\r\n <cui-svg\r\n [icon]=\"loaderIcon()\"\r\n color=\"var(--cui-base-500)\"\r\n [class.icon_loading]=\"loaderState() === state.LOADING\"\r\n />\r\n <span>{{ loaderString() }}</span>\r\n}\r\n", styles: [":host{padding:6px 8px;font-weight:500;font-size:12px;line-height:14px;display:flex;align-items:center;gap:6px;color:var(--cui-base-500)}.icon_loading{animation:spin 1s ease-in-out infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}\n"] }]
7467
7482
  }] });
7468
7483
 
7469
- class CuiUtilityInfoComponent {
7470
- get controls() {
7471
- return this.form.controls;
7472
- }
7473
- get isTitleError() {
7474
- return this.controls.title.invalid && this.controls.title.dirty;
7475
- }
7476
- get isDescriptionError() {
7477
- return this.controls.description.invalid && this.controls.description.dirty;
7478
- }
7484
+ class CuiDeleteModalComponent {
7479
7485
  constructor() {
7480
- this.destroy = inject(DestroyRef);
7481
- this.formBuilder = inject(NonNullableFormBuilder);
7482
- this.translocoService = inject(TranslocoService);
7483
- this.frameApiService = inject(CuiFrameApiService);
7484
- this.cuiAlertService = inject(CuiAlertService);
7485
- this.cuiIdService = inject(CuiIdService);
7486
- this.CONTROL_DELAY = 500;
7487
- this.MAX_FILE_SIZE = 20971520;
7488
- this.titleId = this.cuiIdService.generate();
7489
- this.descriptionId = this.cuiIdService.generate();
7490
- this.form = this.formBuilder.group({
7491
- title: this.formBuilder.control('', createDefaultValidators({ asyncDelay: this.CONTROL_DELAY })),
7492
- description: this.formBuilder.control('', createDefaultValidators({ asyncDelay: this.CONTROL_DELAY }))
7493
- });
7494
- this.isDescriptionModalOpen = signal(false);
7495
- this.isDescriptionEmpty = signal(false);
7496
- this.editorId = signal(null);
7497
- this.thumbnail = signal(null);
7498
- this.thumbnailUrl = computed(() => {
7499
- const thumbnail = this.thumbnail();
7500
- if (thumbnail?.resource) {
7501
- return thumbnail.resource;
7502
- }
7503
- return this.baseResourceUrl() + thumbnail.fileId;
7504
- });
7505
- this.uploadButtonName = computed(() => {
7506
- const thumbnail = this.thumbnail();
7507
- if (thumbnail?.name) {
7508
- return this.translocoService.translate('REPLACE_FILE');
7509
- }
7510
- return this.translocoService.translate('UPLOAD_FILE');
7511
- });
7512
- this.heading = null;
7513
- this.title = input.required();
7514
- this.framerId = input.required();
7515
- this.baseResourceUrl = input.required();
7516
- this.config = input.required();
7517
- this.formChanged = output();
7518
- this.isFormValidChanged = output();
7519
- this.initUtilityEffect();
7520
- }
7521
- onSelectFile() {
7522
- const input = document.createElement('input');
7523
- input.type = 'file';
7524
- input.accept = 'image/jpg, image/jpeg, image/png, video/mp4';
7525
- input.onchange = () => {
7526
- const files = input.files;
7527
- if (!files?.length) {
7528
- return;
7529
- }
7530
- this.getFile(files);
7531
- };
7532
- input.click();
7533
- }
7534
- onEditorEmpty(isEmpty) {
7535
- this.isDescriptionEmpty.set(isEmpty);
7536
- this.isFormValidChanged.emit(this.checkFormValidation());
7537
- }
7538
- onRemoveThumbnail() {
7539
- const frameId = this.framerId();
7540
- const fragmentId = this.thumbnail()?.id;
7541
- if (!frameId || !fragmentId) {
7542
- return;
7543
- }
7544
- this.frameApiService.deleteResource(frameId, fragmentId).subscribe(() => {
7545
- this.thumbnail.update((prev) => ({ ...prev, fileId: null, name: null, resource: null }));
7546
- });
7547
- }
7548
- onToggleDescriptionModal() {
7549
- this.isDescriptionModalOpen.update((prev) => !prev);
7550
- }
7551
- initUtilityEffect() {
7552
- const effectRef = effect(() => {
7553
- const title = this.title();
7554
- if (!title) {
7555
- return;
7556
- }
7557
- this.initTitleSubscriptions();
7558
- this.initFrameFragments();
7559
- effectRef.destroy();
7560
- });
7561
- }
7562
- initTitleSubscriptions() {
7563
- this.form.patchValue({ title: this.title() });
7564
- this.form.statusChanges
7565
- .pipe(takeUntilDestroyed(this.destroy))
7566
- .subscribe(() => this.isFormValidChanged.emit(this.checkFormValidation()));
7567
- this.form.valueChanges
7568
- .pipe(takeUntilDestroyed(this.destroy), startWith(this.form.value), pairwise(), debounceTime(this.CONTROL_DELAY), map(([prev, current]) => this.compareFormValues([prev, current])))
7569
- .subscribe((value) => {
7570
- this.formChanged.emit(value);
7571
- });
7572
- }
7573
- initFrameFragments() {
7574
- const frameId = this.framerId();
7575
- if (!frameId) {
7576
- return;
7577
- }
7578
- this.frameApiService.getFrame(frameId).subscribe((frame) => {
7579
- frame.fragments.forEach((fragment) => {
7580
- if (fragment.type === "J_TEXT" /* FragmentType.jText */) {
7581
- this.editorId.set(fragment?.id);
7582
- }
7583
- if (fragment.type === "RESOURCE_FILE" /* FragmentType.resourceFile */) {
7584
- this.setResourceFile(fragment);
7585
- }
7586
- });
7587
- });
7588
- }
7589
- compareFormValues([prevGroup, currentGruop]) {
7590
- const keys = Object.keys(currentGruop);
7591
- const changedFields = {};
7592
- keys.forEach((key) => {
7593
- const prev = prevGroup[key];
7594
- const current = currentGruop[key];
7595
- if (prev === current) {
7596
- return;
7597
- }
7598
- changedFields[key] = current;
7599
- });
7600
- return changedFields;
7601
- }
7602
- setResourceFile(resource) {
7603
- const url = this.baseResourceUrl() + resource.fileId;
7604
- this.thumbnail.set(resource);
7605
- if (!url || resource?.name?.split('.').pop() !== 'mp4') {
7606
- return;
7607
- }
7608
- this.getCaptureFromVideo(url);
7609
- }
7610
- getFile(files) {
7611
- const file = files.item(0);
7612
- if (!file) {
7613
- return;
7614
- }
7615
- if (file.size > this.MAX_FILE_SIZE) {
7616
- this.cuiAlertService
7617
- .open(this.translocoService.translate('INVALID_FILE_SIZE'), {
7618
- status: 'error'
7619
- })
7620
- .subscribe();
7621
- return;
7622
- }
7623
- const isVideo = file.name.split('.').at(-1) === 'mp4';
7624
- const url = URL.createObjectURL(file);
7625
- if (isVideo) {
7626
- this.getCaptureFromVideo(url, file);
7627
- }
7628
- else {
7629
- this.thumbnail.update((prev) => ({ ...prev, name: file.name, resource: url }));
7630
- }
7631
- this.uploadFile(file);
7632
- }
7633
- uploadFile(file) {
7634
- const frameId = this.framerId();
7635
- const fragmentId = this.thumbnail()?.id;
7636
- if (!frameId || !fragmentId) {
7486
+ this.context = inject(CUI_DIALOG_CONTEXT);
7487
+ this.data = this.context.data;
7488
+ this.title = this.data.title;
7489
+ this.content = this.data.content;
7490
+ this.isLoading = signal(false);
7491
+ this.isDisabled = this.data.isDisabled ?? false;
7492
+ }
7493
+ onDelete() {
7494
+ if (!this.data.delete) {
7637
7495
  return;
7638
7496
  }
7639
- const formData = new FormData();
7640
- formData.append('resource', file);
7641
- this.frameApiService.uploadResource(formData, frameId, fragmentId).subscribe();
7642
- }
7643
- getCaptureFromVideo(url, file) {
7644
- const canvas = document.createElement('canvas');
7645
- const video = document.createElement('video');
7646
- video.src = url;
7647
- video.currentTime = 1;
7648
- canvas.width = 184;
7649
- canvas.height = 120;
7650
- video.onloadeddata = () => {
7651
- const context = canvas.getContext('2d');
7652
- if (!context) {
7653
- return;
7654
- }
7655
- context.drawImage(video, 0, 0, canvas.width, canvas.height);
7656
- canvas.toBlob((blob) => {
7657
- if (!blob) {
7658
- return;
7659
- }
7660
- const videoCaptureUrl = URL.createObjectURL(blob);
7661
- this.thumbnail.update((prev) => ({
7662
- ...prev,
7663
- name: (file?.name || prev?.name),
7664
- resource: videoCaptureUrl
7665
- }));
7666
- });
7667
- };
7668
- video.load();
7497
+ this.isLoading.set(true);
7498
+ this.data
7499
+ .delete()
7500
+ .pipe(finalize(() => this.isLoading.set(false)))
7501
+ .subscribe(() => this.context.completeWith());
7669
7502
  }
7670
- checkFormValidation() {
7671
- console.log(this.isDescriptionEmpty(), this.form.invalid);
7672
- return !this.isDescriptionEmpty() && !this.form.invalid;
7503
+ onCancel() {
7504
+ this.context.completeWith({ canceled: true });
7673
7505
  }
7674
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiUtilityInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7675
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiUtilityInfoComponent, isStandalone: true, selector: "cui-utility-info", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, framerId: { classPropertyName: "framerId", publicName: "framerId", isSignal: true, isRequired: true, transformFunction: null }, baseResourceUrl: { classPropertyName: "baseResourceUrl", publicName: "baseResourceUrl", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { formChanged: "formChanged", isFormValidChanged: "isFormValidChanged" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <section class=\"content\">\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"titleId\">\r\n {{ t('TITLE') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"titleId\"\r\n [cuiTextFieldPlaceholder]=\"t('ADD_TITLE')\"\r\n [cuiTextFieldIsError]=\"isTitleError\"\r\n [formControl]=\"form.controls.title\"\r\n />\r\n @if (isTitleError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.title\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"descriptionId\">\r\n {{ t('SHORT_DESCRIPTION') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"descriptionId\"\r\n cuiTextFieldPlaceholder=\"{{t('SHORT_DESCRIPTION')}}...\"\r\n [cuiTextFieldIsError]=\"isDescriptionError\"\r\n [formControl]=\"form.controls.description\"\r\n />\r\n @if (isDescriptionError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.description\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <section class=\"file\">\r\n <span class=\"title\">{{ t('THUMBNAIL') }}</span>\r\n <div class=\"content__upload\">\r\n <div class=\"content__upload-file\">\r\n @if (thumbnail()?.name; as fileId) {\r\n <div class=\"image\">\r\n <span class=\"image__name\">{{ thumbnail()?.name }}</span>\r\n <!-- TODO: ngSrc -->\r\n <img class=\"image__view\" [src]=\"thumbnailUrl()\" height=\"120\" width=\"184\" alt=\"Thumbnail\" />\r\n </div>\r\n }\r\n <button type=\"button\" cuiButton appearance=\"outlined-gray\" size=\"xxs\" icon=\"cuiIconUpload\"\r\n (click)=\"onSelectFile()\">\r\n {{ uploadButtonName() }}\r\n </button>\r\n @if (thumbnail()?.name) {\r\n <button class=\"content__remove-button\" cuiButton appearance=\"link\" size=\"sm\" type=\"button\"\r\n (click)=\"onRemoveThumbnail()\">\r\n {{ t('REMOVE') }}\r\n </button>\r\n }\r\n <span class=\"content__accepted\">\r\n {{ t('ACCEPTED') }}: JPG, JPEG, PNG, MP4 {{ t('UP_TO') }} 20MB\r\n </span>\r\n </div>\r\n </div>\r\n </section>\r\n @if (editorId(); as editorId) {\r\n <cui-editor-block\r\n [title]=\"form.controls.title.value || title()\"\r\n [config]=\"config()\"\r\n [editorId]=\"editorId\"\r\n [required]=\"true\"\r\n (editorEmpty)=\"onEditorEmpty($event)\"\r\n ></cui-editor-block>\r\n }\r\n </section>\r\n</ng-container>\r\n", styles: ["::ng-deep cui-dialog:has(.instruction-description-modal){inset:0;margin:auto;transform:none!important}:host{display:block}.title{font-weight:500;font-size:14px;line-height:20px;display:flex;gap:2px}.title_required{color:var(--cui-danger)}.content{display:flex;flex-direction:column;gap:16px;padding:16px 24px}.content__upload{padding:12px 16px;border-radius:8px;border:1px solid var(--cui-base-200);background:var(--cui-base-10)}.content__accepted{color:var(--cui-base-500)}.content__upload-file{display:flex;align-items:center;gap:8px}.content__upload-file input[type=file]{display:none}.content__remove-button ::ng-deep .c-content{color:var(--cui-danger)!important}.file{display:flex;flex-direction:column;gap:4px}.description_invalid{border:1px solid var(--cui-danger)}.image{position:relative;display:inline-block}.image__view{border-radius:8px;object-fit:cover}.image__name{position:absolute;top:6px;left:14px;color:var(--cui-base-0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px;z-index:1}.image:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;z-index:0;pointer-events:none;border-radius:8px}.button-save{margin-left:auto}.instruction-description-modal{text-transform:none}.empty{padding:16px;color:var(--cui-base-500);text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => CuiAccordionModule) }, { kind: "ngmodule", type: i0.forwardRef(() => CuiButtonModule) }, { kind: "component", type: i0.forwardRef(() => CuiButtonComponent), selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: i0.forwardRef(() => CuiFormFieldModule) }, { kind: "component", type: i0.forwardRef(() => CuiFormFieldComponent), selector: "cui-form-field" }, { kind: "ngmodule", type: i0.forwardRef(() => CuiHintModule) }, { kind: "ngmodule", type: i0.forwardRef(() => CuiInputModule) }, { kind: "component", type: i0.forwardRef(() => CuiInputTextComponent), selector: "cui-input-text" }, { kind: "directive", type: i0.forwardRef(() => CuiTextFieldIdDirective), selector: "[cuiTextFieldId]", inputs: ["cuiTextFieldId"] }, { kind: "directive", type: i0.forwardRef(() => CuiTextFieldPlaceholderDirective), selector: "[cuiTextFieldPlaceholder]", inputs: ["cuiTextFieldPlaceholder"] }, { kind: "directive", type: i0.forwardRef(() => CuiTextFieldIsErrorDirective), selector: "[cuiTextFieldIsError]", inputs: ["cuiTextFieldIsError"] }, { kind: "ngmodule", type: i0.forwardRef(() => CuiLabelModule) }, { kind: "component", type: i0.forwardRef(() => CuiLabelComponent), selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "component", type: i0.forwardRef(() => CuiEditorBlockComponent), selector: "cui-editor-block", inputs: ["title", "editorId", "config", "required"], outputs: ["editorEmpty"] }, { kind: "component", type: i0.forwardRef(() => CuiGeneralControlErrorHintComponent), selector: "cui-general-control-error-hint", inputs: ["control", "isVisible"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i2$1.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i2$1.FormControlDirective), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => TranslocoDirective), selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7506
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7507
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiDeleteModalComponent, isStandalone: true, selector: "cui-delete-modal", ngImport: i0, template: "<div\r\n *transloco=\"let t\"\r\n class=\"wrapper\"\r\n>\r\n <div class=\"content\">\r\n <div class=\"header\">\r\n <h3 class=\"title\">{{ t(title) }}</h3>\r\n <button\r\n type=\"button\"\r\n cuiButton\r\n icon=\"cuiIconX\"\r\n appearance=\"ghost\"\r\n [disabled]=\"isLoading()\"\r\n class=\"close-btn\"\r\n (click)=\"onCancel()\"\r\n ></button>\r\n </div>\r\n <div class=\"info\">\r\n @for (text of content; track text) {\r\n <p [innerHTML]=\"t(text)\"></p>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"footer\">\r\n <button\r\n type=\"button\"\r\n cuiButton\r\n (click)=\"onCancel()\"\r\n [disabled]=\"isLoading()\"\r\n appearance=\"secondary\"\r\n >\r\n {{ t('CANCEL') }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n cuiButton\r\n [isLoaderShown]=\"isLoading()\"\r\n [disabled]=\"isDisabled\"\r\n [cuiTooltip]=\"isDisabled && t('IN_DEVELOPMENT')\"\r\n appearance=\"destructive\"\r\n (click)=\"onDelete()\"\r\n >\r\n {{ t('YES_DELETE') }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".wrapper{display:flex;flex-direction:column;gap:24px;padding:23px;border-radius:12px;width:400px}.header{display:flex;gap:8px;justify-content:space-between}.content{display:flex;flex-direction:column;gap:12px}.title{font-weight:500;font-size:18px;line-height:28px}.info{display:flex;flex-direction:column;gap:16px;font-weight:400;font-size:14px;line-height:20px}.footer{display:flex;gap:12px;justify-content:flex-end}.close-btn{margin:-8px}\n"], dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i2$2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: CuiTooltipDirective, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: ["cuiTooltipContext", "cuiTooltipAppearance", "cuiTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7676
7508
  }
7677
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiUtilityInfoComponent, decorators: [{
7509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiDeleteModalComponent, decorators: [{
7678
7510
  type: Component,
7679
- args: [{ selector: 'cui-utility-info', imports: [
7680
- CuiAccordionModule,
7681
- CuiButtonModule,
7682
- CuiFormFieldModule,
7683
- CuiHintModule,
7684
- CuiInputModule,
7685
- CuiLabelModule,
7686
- forwardRef(() => CuiEditorBlockComponent),
7687
- CuiGeneralControlErrorHintComponent,
7688
- ReactiveFormsModule,
7689
- TranslocoDirective,
7690
- CuiTooltip
7691
- ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <section class=\"content\">\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"titleId\">\r\n {{ t('TITLE') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"titleId\"\r\n [cuiTextFieldPlaceholder]=\"t('ADD_TITLE')\"\r\n [cuiTextFieldIsError]=\"isTitleError\"\r\n [formControl]=\"form.controls.title\"\r\n />\r\n @if (isTitleError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.title\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"descriptionId\">\r\n {{ t('SHORT_DESCRIPTION') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"descriptionId\"\r\n cuiTextFieldPlaceholder=\"{{t('SHORT_DESCRIPTION')}}...\"\r\n [cuiTextFieldIsError]=\"isDescriptionError\"\r\n [formControl]=\"form.controls.description\"\r\n />\r\n @if (isDescriptionError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.description\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <section class=\"file\">\r\n <span class=\"title\">{{ t('THUMBNAIL') }}</span>\r\n <div class=\"content__upload\">\r\n <div class=\"content__upload-file\">\r\n @if (thumbnail()?.name; as fileId) {\r\n <div class=\"image\">\r\n <span class=\"image__name\">{{ thumbnail()?.name }}</span>\r\n <!-- TODO: ngSrc -->\r\n <img class=\"image__view\" [src]=\"thumbnailUrl()\" height=\"120\" width=\"184\" alt=\"Thumbnail\" />\r\n </div>\r\n }\r\n <button type=\"button\" cuiButton appearance=\"outlined-gray\" size=\"xxs\" icon=\"cuiIconUpload\"\r\n (click)=\"onSelectFile()\">\r\n {{ uploadButtonName() }}\r\n </button>\r\n @if (thumbnail()?.name) {\r\n <button class=\"content__remove-button\" cuiButton appearance=\"link\" size=\"sm\" type=\"button\"\r\n (click)=\"onRemoveThumbnail()\">\r\n {{ t('REMOVE') }}\r\n </button>\r\n }\r\n <span class=\"content__accepted\">\r\n {{ t('ACCEPTED') }}: JPG, JPEG, PNG, MP4 {{ t('UP_TO') }} 20MB\r\n </span>\r\n </div>\r\n </div>\r\n </section>\r\n @if (editorId(); as editorId) {\r\n <cui-editor-block\r\n [title]=\"form.controls.title.value || title()\"\r\n [config]=\"config()\"\r\n [editorId]=\"editorId\"\r\n [required]=\"true\"\r\n (editorEmpty)=\"onEditorEmpty($event)\"\r\n ></cui-editor-block>\r\n }\r\n </section>\r\n</ng-container>\r\n", styles: ["::ng-deep cui-dialog:has(.instruction-description-modal){inset:0;margin:auto;transform:none!important}:host{display:block}.title{font-weight:500;font-size:14px;line-height:20px;display:flex;gap:2px}.title_required{color:var(--cui-danger)}.content{display:flex;flex-direction:column;gap:16px;padding:16px 24px}.content__upload{padding:12px 16px;border-radius:8px;border:1px solid var(--cui-base-200);background:var(--cui-base-10)}.content__accepted{color:var(--cui-base-500)}.content__upload-file{display:flex;align-items:center;gap:8px}.content__upload-file input[type=file]{display:none}.content__remove-button ::ng-deep .c-content{color:var(--cui-danger)!important}.file{display:flex;flex-direction:column;gap:4px}.description_invalid{border:1px solid var(--cui-danger)}.image{position:relative;display:inline-block}.image__view{border-radius:8px;object-fit:cover}.image__name{position:absolute;top:6px;left:14px;color:var(--cui-base-0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px;z-index:1}.image:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;z-index:0;pointer-events:none;border-radius:8px}.button-save{margin-left:auto}.instruction-description-modal{text-transform:none}.empty{padding:16px;color:var(--cui-base-500);text-align:center}\n"] }]
7692
- }], ctorParameters: () => [] });
7511
+ args: [{ selector: 'cui-delete-modal', imports: [CuiButtonModule, TranslocoModule, CuiTooltip], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *transloco=\"let t\"\r\n class=\"wrapper\"\r\n>\r\n <div class=\"content\">\r\n <div class=\"header\">\r\n <h3 class=\"title\">{{ t(title) }}</h3>\r\n <button\r\n type=\"button\"\r\n cuiButton\r\n icon=\"cuiIconX\"\r\n appearance=\"ghost\"\r\n [disabled]=\"isLoading()\"\r\n class=\"close-btn\"\r\n (click)=\"onCancel()\"\r\n ></button>\r\n </div>\r\n <div class=\"info\">\r\n @for (text of content; track text) {\r\n <p [innerHTML]=\"t(text)\"></p>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"footer\">\r\n <button\r\n type=\"button\"\r\n cuiButton\r\n (click)=\"onCancel()\"\r\n [disabled]=\"isLoading()\"\r\n appearance=\"secondary\"\r\n >\r\n {{ t('CANCEL') }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n cuiButton\r\n [isLoaderShown]=\"isLoading()\"\r\n [disabled]=\"isDisabled\"\r\n [cuiTooltip]=\"isDisabled && t('IN_DEVELOPMENT')\"\r\n appearance=\"destructive\"\r\n (click)=\"onDelete()\"\r\n >\r\n {{ t('YES_DELETE') }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".wrapper{display:flex;flex-direction:column;gap:24px;padding:23px;border-radius:12px;width:400px}.header{display:flex;gap:8px;justify-content:space-between}.content{display:flex;flex-direction:column;gap:12px}.title{font-weight:500;font-size:18px;line-height:28px}.info{display:flex;flex-direction:column;gap:16px;font-weight:400;font-size:14px;line-height:20px}.footer{display:flex;gap:12px;justify-content:flex-end}.close-btn{margin:-8px}\n"] }]
7512
+ }] });
7693
7513
 
7694
7514
  class CuiSelectedCategoryService {
7695
7515
  constructor() {
@@ -7727,6 +7547,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7727
7547
  }]
7728
7548
  }] });
7729
7549
 
7550
+ class CuiGeneralControlErrorHintComponent {
7551
+ constructor() {
7552
+ this.control = input.required();
7553
+ this.isVisible = input();
7554
+ }
7555
+ get isInvalid() {
7556
+ return this.isVisible() ?? (this.control().invalid && this.control().dirty);
7557
+ }
7558
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiGeneralControlErrorHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7559
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiGeneralControlErrorHintComponent, isStandalone: true, selector: "cui-general-control-error-hint", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n @if (isInvalid) {\r\n @if (control().errors; as errors) {\r\n <cui-hint hintType=\"error\">\r\n @if (errors['required']) {\r\n {{ t('FIELD_IS_REQUIRED') }}\r\n } @else if (errors['maxlength']) {\r\n {{ t('PLEASE_KEEP_FIELD_UNDER_CHARACTERS', { value: errors['maxlength'].requiredLength }) }}\r\n } @else if (errors['extraSpaces']) {\r\n {{ t('MUST_BE_WITHOUT_EXTRA_SPACES') }}\r\n } @else if (errors['min']) {\r\n {{ t('MIN_VALUE_MUST_BE_MORE_THAN', { value: errors['min'].min }) }}\r\n } @else if (errors['max']) {\r\n {{ t('MAX_VALUE_MUST_BE_LESS_THAN', { value: errors['max'].max }) }}\r\n }\r\n </cui-hint>\r\n }\r\n }\r\n</ng-container>\r\n", styles: [":host{display:inline-block}:host:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CuiHintModule }, { kind: "component", type: CuiHintComponent, selector: "cui-hint", inputs: ["hintType"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
7560
+ }
7561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiGeneralControlErrorHintComponent, decorators: [{
7562
+ type: Component,
7563
+ args: [{ selector: 'cui-general-control-error-hint', imports: [CuiHintModule, TranslocoDirective], standalone: true, changeDetection: ChangeDetectionStrategy.Default, template: "<ng-container *transloco=\"let t\">\r\n @if (isInvalid) {\r\n @if (control().errors; as errors) {\r\n <cui-hint hintType=\"error\">\r\n @if (errors['required']) {\r\n {{ t('FIELD_IS_REQUIRED') }}\r\n } @else if (errors['maxlength']) {\r\n {{ t('PLEASE_KEEP_FIELD_UNDER_CHARACTERS', { value: errors['maxlength'].requiredLength }) }}\r\n } @else if (errors['extraSpaces']) {\r\n {{ t('MUST_BE_WITHOUT_EXTRA_SPACES') }}\r\n } @else if (errors['min']) {\r\n {{ t('MIN_VALUE_MUST_BE_MORE_THAN', { value: errors['min'].min }) }}\r\n } @else if (errors['max']) {\r\n {{ t('MAX_VALUE_MUST_BE_LESS_THAN', { value: errors['max'].max }) }}\r\n }\r\n </cui-hint>\r\n }\r\n }\r\n</ng-container>\r\n", styles: [":host{display:inline-block}:host:empty{display:none}\n"] }]
7564
+ }] });
7565
+
7730
7566
  class CuiCategoryFormComponent {
7731
7567
  get isTitleInvalid() {
7732
7568
  return this.titleControl.invalid && this.titleControl.dirty;
@@ -7737,7 +7573,7 @@ class CuiCategoryFormComponent {
7737
7573
  constructor() {
7738
7574
  this.nonNullableFormBuilder = inject(NonNullableFormBuilder);
7739
7575
  this.form = this.nonNullableFormBuilder.group({
7740
- title: ['', createDefaultValidators({ asyncDelay: 0 })]
7576
+ title: ['', cuiCreateDefaultValidators({ asyncDelay: 0 })]
7741
7577
  });
7742
7578
  this.titleControl = this.form.controls.title;
7743
7579
  this.isDisabled = input(false);
@@ -8005,9 +7841,1121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
8005
7841
  ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\r\n [attr.id]=\"buttonId()\"\r\n #dropdown=\"cuiDropdown\"\r\n [cuiDropdown]=\"dropdownContent\"\r\n orientation=\"stretch\"\r\n type=\"button\"\r\n class=\"target\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"onOpenStageStorages()\"\r\n>\r\n <ng-content />\r\n</button>\r\n\r\n<ng-template #dropdownContent>\r\n <cui-dropdown-wrapper\r\n *transloco=\"let t\"\r\n [title]=\"t('SELECT_OR_CREATE_CATEGORY')\"\r\n width=\"100%\"\r\n class=\"dropdown-wrapper\"\r\n >\r\n <ng-container *cuiLet=\"stageStorages() as stageStorages\">\r\n @if (stageStorages && stageStorages?.length) {\r\n <cui-categories-list [stageStorages]=\"stageStorages\" />\r\n }\r\n @if (isCreateCategoryControlVisible()) {\r\n <cui-create-category-item\r\n class=\"create-category\"\r\n [isDisabled]=\"isCategoryCreationLoading()\"\r\n (created)=\"onCreateNewCategory($event)\"\r\n (canceled)=\"onCreatingCategoryCanceled()\"\r\n />\r\n } @else if (!stageStorages?.length) {\r\n <cui-empty-state\r\n class=\"empty\"\r\n [subtitle]=\"t('NO_CATEGORY_TO_VIEW_YET')\"\r\n />\r\n }\r\n </ng-container>\r\n <button\r\n ccDropdownFooterContent\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconPlus\"\r\n (click)=\"onStartCreatingNewCategory()\"\r\n >\r\n {{ t('NEW_CATEGORY') }}\r\n </button>\r\n </cui-dropdown-wrapper>\r\n</ng-template>\r\n", styles: ["::ng-deep .dropdown-wrapper .scrollable-content{flex:1;display:flex;flex-direction:column}.target{display:block;padding:0;width:100%;border-radius:8px;border:1px solid transparent}.target:focus{box-shadow:0 0 0 2px var(--cui-focus);border:1px solid var(--cui-info)}.target:disabled{cursor:default}.create-category{margin-left:24px}.empty{margin:auto}.dropdown-wrapper{display:block;height:350px}\n"] }]
8006
7842
  }], ctorParameters: () => [] });
8007
7843
 
7844
+ class CuiUtilityInfoComponent {
7845
+ get controls() {
7846
+ return this.form.controls;
7847
+ }
7848
+ get isTitleError() {
7849
+ return this.controls.title.invalid && this.controls.title.dirty;
7850
+ }
7851
+ get isDescriptionError() {
7852
+ return this.controls.description.invalid && this.controls.description.dirty;
7853
+ }
7854
+ constructor() {
7855
+ this.destroy = inject(DestroyRef);
7856
+ this.formBuilder = inject(NonNullableFormBuilder);
7857
+ this.translocoService = inject(TranslocoService);
7858
+ this.frameApiService = inject(CuiFrameApiService);
7859
+ this.cuiAlertService = inject(CuiAlertService);
7860
+ this.cuiIdService = inject(CuiIdService);
7861
+ this.CONTROL_DELAY = 500;
7862
+ this.MAX_FILE_SIZE = 20971520;
7863
+ this.titleId = this.cuiIdService.generate();
7864
+ this.descriptionId = this.cuiIdService.generate();
7865
+ this.form = this.formBuilder.group({
7866
+ title: this.formBuilder.control('', cuiCreateDefaultValidators({ asyncDelay: this.CONTROL_DELAY })),
7867
+ description: this.formBuilder.control('', cuiCreateDefaultValidators({ asyncDelay: this.CONTROL_DELAY }))
7868
+ });
7869
+ this.isDescriptionModalOpen = signal(false);
7870
+ this.isDescriptionEmpty = signal(false);
7871
+ this.editorId = signal(null);
7872
+ this.thumbnail = signal(null);
7873
+ this.thumbnailUrl = computed(() => {
7874
+ const thumbnail = this.thumbnail();
7875
+ if (thumbnail?.resource) {
7876
+ return thumbnail.resource;
7877
+ }
7878
+ return this.baseResourceUrl() + thumbnail.fileId;
7879
+ });
7880
+ this.uploadButtonName = computed(() => {
7881
+ const thumbnail = this.thumbnail();
7882
+ if (thumbnail?.name) {
7883
+ return this.translocoService.translate('REPLACE_FILE');
7884
+ }
7885
+ return this.translocoService.translate('UPLOAD_FILE');
7886
+ });
7887
+ this.heading = null;
7888
+ this.title = input.required();
7889
+ this.framerId = input.required();
7890
+ this.baseResourceUrl = input.required();
7891
+ this.config = input.required();
7892
+ this.formChanged = output();
7893
+ this.isFormValidChanged = output();
7894
+ this.initUtilityEffect();
7895
+ }
7896
+ onSelectFile() {
7897
+ const input = document.createElement('input');
7898
+ input.type = 'file';
7899
+ input.accept = 'image/jpg, image/jpeg, image/png, video/mp4';
7900
+ input.onchange = () => {
7901
+ const files = input.files;
7902
+ if (!files?.length) {
7903
+ return;
7904
+ }
7905
+ this.getFile(files);
7906
+ };
7907
+ input.click();
7908
+ }
7909
+ onEditorEmpty(isEmpty) {
7910
+ this.isDescriptionEmpty.set(isEmpty);
7911
+ this.isFormValidChanged.emit(this.checkFormValidation());
7912
+ }
7913
+ onRemoveThumbnail() {
7914
+ const frameId = this.framerId();
7915
+ const fragmentId = this.thumbnail()?.id;
7916
+ if (!frameId || !fragmentId) {
7917
+ return;
7918
+ }
7919
+ this.frameApiService.deleteResource(frameId, fragmentId).subscribe(() => {
7920
+ this.thumbnail.update((prev) => ({ ...prev, fileId: null, name: null, resource: null }));
7921
+ });
7922
+ }
7923
+ onToggleDescriptionModal() {
7924
+ this.isDescriptionModalOpen.update((prev) => !prev);
7925
+ }
7926
+ initUtilityEffect() {
7927
+ const effectRef = effect(() => {
7928
+ const title = this.title();
7929
+ if (!title) {
7930
+ return;
7931
+ }
7932
+ this.initTitleSubscriptions();
7933
+ this.initFrameFragments();
7934
+ effectRef.destroy();
7935
+ });
7936
+ }
7937
+ initTitleSubscriptions() {
7938
+ this.form.patchValue({ title: this.title() });
7939
+ this.form.statusChanges
7940
+ .pipe(takeUntilDestroyed(this.destroy))
7941
+ .subscribe(() => this.isFormValidChanged.emit(this.checkFormValidation()));
7942
+ this.form.valueChanges
7943
+ .pipe(takeUntilDestroyed(this.destroy), startWith(this.form.value), pairwise(), debounceTime(this.CONTROL_DELAY), map(([prev, current]) => this.compareFormValues([prev, current])))
7944
+ .subscribe((value) => {
7945
+ this.formChanged.emit(value);
7946
+ });
7947
+ }
7948
+ initFrameFragments() {
7949
+ const frameId = this.framerId();
7950
+ if (!frameId) {
7951
+ return;
7952
+ }
7953
+ this.frameApiService.getFrame(frameId).subscribe((frame) => {
7954
+ frame.fragments.forEach((fragment) => {
7955
+ if (fragment.type === "J_TEXT" /* FragmentType.jText */) {
7956
+ this.editorId.set(fragment?.id);
7957
+ }
7958
+ if (fragment.type === "RESOURCE_FILE" /* FragmentType.resourceFile */) {
7959
+ this.setResourceFile(fragment);
7960
+ }
7961
+ });
7962
+ });
7963
+ }
7964
+ compareFormValues([prevGroup, currentGruop]) {
7965
+ const keys = Object.keys(currentGruop);
7966
+ const changedFields = {};
7967
+ keys.forEach((key) => {
7968
+ const prev = prevGroup[key];
7969
+ const current = currentGruop[key];
7970
+ if (prev === current) {
7971
+ return;
7972
+ }
7973
+ changedFields[key] = current;
7974
+ });
7975
+ return changedFields;
7976
+ }
7977
+ setResourceFile(resource) {
7978
+ const url = this.baseResourceUrl() + resource.fileId;
7979
+ this.thumbnail.set(resource);
7980
+ if (!url || resource?.name?.split('.').pop() !== 'mp4') {
7981
+ return;
7982
+ }
7983
+ this.getCaptureFromVideo(url);
7984
+ }
7985
+ getFile(files) {
7986
+ const file = files.item(0);
7987
+ if (!file) {
7988
+ return;
7989
+ }
7990
+ if (file.size > this.MAX_FILE_SIZE) {
7991
+ this.cuiAlertService
7992
+ .open(this.translocoService.translate('INVALID_FILE_SIZE'), {
7993
+ status: 'error'
7994
+ })
7995
+ .subscribe();
7996
+ return;
7997
+ }
7998
+ const isVideo = file.name.split('.').at(-1) === 'mp4';
7999
+ const url = URL.createObjectURL(file);
8000
+ if (isVideo) {
8001
+ this.getCaptureFromVideo(url, file);
8002
+ }
8003
+ else {
8004
+ this.thumbnail.update((prev) => ({ ...prev, name: file.name, resource: url }));
8005
+ }
8006
+ this.uploadFile(file);
8007
+ }
8008
+ uploadFile(file) {
8009
+ const frameId = this.framerId();
8010
+ const fragmentId = this.thumbnail()?.id;
8011
+ if (!frameId || !fragmentId) {
8012
+ return;
8013
+ }
8014
+ const formData = new FormData();
8015
+ formData.append('resource', file);
8016
+ this.frameApiService.uploadResource(formData, frameId, fragmentId).subscribe();
8017
+ }
8018
+ getCaptureFromVideo(url, file) {
8019
+ const canvas = document.createElement('canvas');
8020
+ const video = document.createElement('video');
8021
+ video.src = url;
8022
+ video.currentTime = 1;
8023
+ canvas.width = 184;
8024
+ canvas.height = 120;
8025
+ video.onloadeddata = () => {
8026
+ const context = canvas.getContext('2d');
8027
+ if (!context) {
8028
+ return;
8029
+ }
8030
+ context.drawImage(video, 0, 0, canvas.width, canvas.height);
8031
+ canvas.toBlob((blob) => {
8032
+ if (!blob) {
8033
+ return;
8034
+ }
8035
+ const videoCaptureUrl = URL.createObjectURL(blob);
8036
+ this.thumbnail.update((prev) => ({
8037
+ ...prev,
8038
+ name: (file?.name || prev?.name),
8039
+ resource: videoCaptureUrl
8040
+ }));
8041
+ });
8042
+ };
8043
+ video.load();
8044
+ }
8045
+ checkFormValidation() {
8046
+ console.log(this.isDescriptionEmpty(), this.form.invalid);
8047
+ return !this.isDescriptionEmpty() && !this.form.invalid;
8048
+ }
8049
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiUtilityInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8050
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiUtilityInfoComponent, isStandalone: true, selector: "cui-utility-info", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, framerId: { classPropertyName: "framerId", publicName: "framerId", isSignal: true, isRequired: true, transformFunction: null }, baseResourceUrl: { classPropertyName: "baseResourceUrl", publicName: "baseResourceUrl", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { formChanged: "formChanged", isFormValidChanged: "isFormValidChanged" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <section class=\"content\">\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"titleId\">\r\n {{ t('TITLE') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"titleId\"\r\n [cuiTextFieldPlaceholder]=\"t('ADD_TITLE')\"\r\n [cuiTextFieldIsError]=\"isTitleError\"\r\n [formControl]=\"form.controls.title\"\r\n />\r\n @if (isTitleError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.title\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"descriptionId\">\r\n {{ t('SHORT_DESCRIPTION') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"descriptionId\"\r\n cuiTextFieldPlaceholder=\"{{t('SHORT_DESCRIPTION')}}...\"\r\n [cuiTextFieldIsError]=\"isDescriptionError\"\r\n [formControl]=\"form.controls.description\"\r\n />\r\n @if (isDescriptionError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.description\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <section class=\"file\">\r\n <span class=\"title\">{{ t('THUMBNAIL') }}</span>\r\n <div class=\"content__upload\">\r\n <div class=\"content__upload-file\">\r\n @if (thumbnail()?.name; as fileId) {\r\n <div class=\"image\">\r\n <span class=\"image__name\">{{ thumbnail()?.name }}</span>\r\n <!-- TODO: ngSrc -->\r\n <img class=\"image__view\" [src]=\"thumbnailUrl()\" height=\"120\" width=\"184\" alt=\"Thumbnail\" />\r\n </div>\r\n }\r\n <button type=\"button\" cuiButton appearance=\"outlined-gray\" size=\"xxs\" icon=\"cuiIconUpload\"\r\n (click)=\"onSelectFile()\">\r\n {{ uploadButtonName() }}\r\n </button>\r\n @if (thumbnail()?.name) {\r\n <button class=\"content__remove-button\" cuiButton appearance=\"link\" size=\"sm\" type=\"button\"\r\n (click)=\"onRemoveThumbnail()\">\r\n {{ t('REMOVE') }}\r\n </button>\r\n }\r\n <span class=\"content__accepted\">\r\n {{ t('ACCEPTED') }}: JPG, JPEG, PNG, MP4 {{ t('UP_TO') }} 20MB\r\n </span>\r\n </div>\r\n </div>\r\n </section>\r\n @if (editorId(); as editorId) {\r\n <cui-editor-block\r\n [title]=\"form.controls.title.value || title()\"\r\n [config]=\"config()\"\r\n [editorId]=\"editorId\"\r\n [required]=\"true\"\r\n (editorEmpty)=\"onEditorEmpty($event)\"\r\n ></cui-editor-block>\r\n }\r\n </section>\r\n</ng-container>\r\n", styles: ["::ng-deep cui-dialog:has(.instruction-description-modal){inset:0;margin:auto;transform:none!important}:host{display:block}.title{font-weight:500;font-size:14px;line-height:20px;display:flex;gap:2px}.title_required{color:var(--cui-danger)}.content{display:flex;flex-direction:column;gap:16px;padding:16px 24px}.content__upload{padding:12px 16px;border-radius:8px;border:1px solid var(--cui-base-200);background:var(--cui-base-10)}.content__accepted{color:var(--cui-base-500)}.content__upload-file{display:flex;align-items:center;gap:8px}.content__upload-file input[type=file]{display:none}.content__remove-button ::ng-deep .c-content{color:var(--cui-danger)!important}.file{display:flex;flex-direction:column;gap:4px}.description_invalid{border:1px solid var(--cui-danger)}.image{position:relative;display:inline-block}.image__view{border-radius:8px;object-fit:cover}.image__name{position:absolute;top:6px;left:14px;color:var(--cui-base-0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px;z-index:1}.image:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;z-index:0;pointer-events:none;border-radius:8px}.button-save{margin-left:auto}.instruction-description-modal{text-transform:none}.empty{padding:16px;color:var(--cui-base-500);text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => CuiAccordionModule) }, { kind: "ngmodule", type: i0.forwardRef(() => CuiButtonModule) }, { kind: "component", type: i0.forwardRef(() => CuiButtonComponent), selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: i0.forwardRef(() => CuiFormFieldModule) }, { kind: "component", type: i0.forwardRef(() => CuiFormFieldComponent), selector: "cui-form-field" }, { kind: "ngmodule", type: i0.forwardRef(() => CuiHintModule) }, { kind: "ngmodule", type: i0.forwardRef(() => CuiInputModule) }, { kind: "component", type: i0.forwardRef(() => CuiInputTextComponent), selector: "cui-input-text" }, { kind: "directive", type: i0.forwardRef(() => CuiTextFieldIdDirective), selector: "[cuiTextFieldId]", inputs: ["cuiTextFieldId"] }, { kind: "directive", type: i0.forwardRef(() => CuiTextFieldPlaceholderDirective), selector: "[cuiTextFieldPlaceholder]", inputs: ["cuiTextFieldPlaceholder"] }, { kind: "directive", type: i0.forwardRef(() => CuiTextFieldIsErrorDirective), selector: "[cuiTextFieldIsError]", inputs: ["cuiTextFieldIsError"] }, { kind: "ngmodule", type: i0.forwardRef(() => CuiLabelModule) }, { kind: "component", type: i0.forwardRef(() => CuiLabelComponent), selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "component", type: i0.forwardRef(() => CuiEditorBlockComponent), selector: "cui-editor-block", inputs: ["title", "editorId", "config", "required"], outputs: ["editorEmpty"] }, { kind: "component", type: i0.forwardRef(() => CuiGeneralControlErrorHintComponent), selector: "cui-general-control-error-hint", inputs: ["control", "isVisible"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i2$1.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i2$1.FormControlDirective), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => TranslocoDirective), selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8051
+ }
8052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiUtilityInfoComponent, decorators: [{
8053
+ type: Component,
8054
+ args: [{ selector: 'cui-utility-info', imports: [
8055
+ CuiAccordionModule,
8056
+ CuiButtonModule,
8057
+ CuiFormFieldModule,
8058
+ CuiHintModule,
8059
+ CuiInputModule,
8060
+ CuiLabelModule,
8061
+ forwardRef(() => CuiEditorBlockComponent),
8062
+ CuiGeneralControlErrorHintComponent,
8063
+ ReactiveFormsModule,
8064
+ TranslocoDirective,
8065
+ CuiTooltip
8066
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <section class=\"content\">\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"titleId\">\r\n {{ t('TITLE') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"titleId\"\r\n [cuiTextFieldPlaceholder]=\"t('ADD_TITLE')\"\r\n [cuiTextFieldIsError]=\"isTitleError\"\r\n [formControl]=\"form.controls.title\"\r\n />\r\n @if (isTitleError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.title\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <cui-form-field>\r\n <label cuiLabel [isRequired]=\"true\" [for]=\"descriptionId\">\r\n {{ t('SHORT_DESCRIPTION') }}\r\n </label>\r\n <cui-input-text\r\n [cuiTextFieldId]=\"descriptionId\"\r\n cuiTextFieldPlaceholder=\"{{t('SHORT_DESCRIPTION')}}...\"\r\n [cuiTextFieldIsError]=\"isDescriptionError\"\r\n [formControl]=\"form.controls.description\"\r\n />\r\n @if (isDescriptionError) {\r\n <cui-general-control-error-hint [control]=\"form.controls.description\" [isVisible]=\"true\" />\r\n }\r\n </cui-form-field>\r\n <section class=\"file\">\r\n <span class=\"title\">{{ t('THUMBNAIL') }}</span>\r\n <div class=\"content__upload\">\r\n <div class=\"content__upload-file\">\r\n @if (thumbnail()?.name; as fileId) {\r\n <div class=\"image\">\r\n <span class=\"image__name\">{{ thumbnail()?.name }}</span>\r\n <!-- TODO: ngSrc -->\r\n <img class=\"image__view\" [src]=\"thumbnailUrl()\" height=\"120\" width=\"184\" alt=\"Thumbnail\" />\r\n </div>\r\n }\r\n <button type=\"button\" cuiButton appearance=\"outlined-gray\" size=\"xxs\" icon=\"cuiIconUpload\"\r\n (click)=\"onSelectFile()\">\r\n {{ uploadButtonName() }}\r\n </button>\r\n @if (thumbnail()?.name) {\r\n <button class=\"content__remove-button\" cuiButton appearance=\"link\" size=\"sm\" type=\"button\"\r\n (click)=\"onRemoveThumbnail()\">\r\n {{ t('REMOVE') }}\r\n </button>\r\n }\r\n <span class=\"content__accepted\">\r\n {{ t('ACCEPTED') }}: JPG, JPEG, PNG, MP4 {{ t('UP_TO') }} 20MB\r\n </span>\r\n </div>\r\n </div>\r\n </section>\r\n @if (editorId(); as editorId) {\r\n <cui-editor-block\r\n [title]=\"form.controls.title.value || title()\"\r\n [config]=\"config()\"\r\n [editorId]=\"editorId\"\r\n [required]=\"true\"\r\n (editorEmpty)=\"onEditorEmpty($event)\"\r\n ></cui-editor-block>\r\n }\r\n </section>\r\n</ng-container>\r\n", styles: ["::ng-deep cui-dialog:has(.instruction-description-modal){inset:0;margin:auto;transform:none!important}:host{display:block}.title{font-weight:500;font-size:14px;line-height:20px;display:flex;gap:2px}.title_required{color:var(--cui-danger)}.content{display:flex;flex-direction:column;gap:16px;padding:16px 24px}.content__upload{padding:12px 16px;border-radius:8px;border:1px solid var(--cui-base-200);background:var(--cui-base-10)}.content__accepted{color:var(--cui-base-500)}.content__upload-file{display:flex;align-items:center;gap:8px}.content__upload-file input[type=file]{display:none}.content__remove-button ::ng-deep .c-content{color:var(--cui-danger)!important}.file{display:flex;flex-direction:column;gap:4px}.description_invalid{border:1px solid var(--cui-danger)}.image{position:relative;display:inline-block}.image__view{border-radius:8px;object-fit:cover}.image__name{position:absolute;top:6px;left:14px;color:var(--cui-base-0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px;z-index:1}.image:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;z-index:0;pointer-events:none;border-radius:8px}.button-save{margin-left:auto}.instruction-description-modal{text-transform:none}.empty{padding:16px;color:var(--cui-base-500);text-align:center}\n"] }]
8067
+ }], ctorParameters: () => [] });
8068
+
8069
+ class CuiCheckListBlockService {
8070
+ constructor() {
8071
+ this.checkListItemsSignal = signal(null);
8072
+ this.componentIdSignal = signal(null);
8073
+ this.isDragAvailableSignal = signal(false);
8074
+ this.checkListItems = this.checkListItemsSignal.asReadonly();
8075
+ this.componentId = this.componentIdSignal.asReadonly();
8076
+ this.isDragAvailable = this.isDragAvailableSignal.asReadonly();
8077
+ }
8078
+ setCheckListItems(checkListItems) {
8079
+ this.checkListItemsSignal.set(checkListItems);
8080
+ }
8081
+ addCheckListItem(checkListItem) {
8082
+ this.checkListItemsSignal.update((value) => (value ? [...value, checkListItem] : [checkListItem]));
8083
+ }
8084
+ updateCheckListItem(updatedCheckListItem) {
8085
+ if (!this.checkListItemsSignal()) {
8086
+ return;
8087
+ }
8088
+ this.checkListItemsSignal.update((value) => {
8089
+ const updateCheckListItemIndex = value.findIndex((checkListItem) => checkListItem.id === updatedCheckListItem.id);
8090
+ value[updateCheckListItemIndex] = updatedCheckListItem;
8091
+ return [...value];
8092
+ });
8093
+ }
8094
+ deleteCheckListItem(id) {
8095
+ if (!this.checkListItemsSignal()) {
8096
+ return;
8097
+ }
8098
+ this.checkListItemsSignal.update((value) => {
8099
+ const deletedItemIndex = value.findIndex((checklistItem) => checklistItem.id === id);
8100
+ value.splice(deletedItemIndex, 1);
8101
+ return [...value];
8102
+ });
8103
+ }
8104
+ setComponentId(id) {
8105
+ this.componentIdSignal.set(id);
8106
+ }
8107
+ toggleDragPermission(isDragButtonVisible) {
8108
+ this.isDragAvailableSignal.set(isDragButtonVisible);
8109
+ }
8110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
8111
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockService }); }
8112
+ }
8113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockService, decorators: [{
8114
+ type: Injectable
8115
+ }] });
8116
+
8117
+ class CuiCheckListBlockListItemActionCardComponent {
8118
+ get photoGroup() {
8119
+ return this.actionForm.get('photo');
8120
+ }
8121
+ get commentGroup() {
8122
+ return this.actionForm.get('comment');
8123
+ }
8124
+ constructor() {
8125
+ this.destroyRef = inject(DestroyRef);
8126
+ this.nonNullableFormBuilder = inject(NonNullableFormBuilder);
8127
+ this.purposeType = input();
8128
+ this.isConsiderationNeeded = input(false);
8129
+ this.actionInfo = input.required();
8130
+ this.consideredCorrectChanged = output();
8131
+ this.checkListActionChanged = output();
8132
+ this._actionInfo = signal(null);
8133
+ this.attachmentPhotoAction = computed(() => this.actionInfo().actions.find((contentAction) => contentAction.contentActionType === 'ATTACHMENT_PHOTO'));
8134
+ this.textAreaAction = computed(() => this.actionInfo().actions.find((contentAction) => contentAction.contentActionType === 'TEXT_AREA'));
8135
+ this.isConsideredCorrectControl = this.nonNullableFormBuilder.control({
8136
+ value: false,
8137
+ disabled: false
8138
+ });
8139
+ effect(() => {
8140
+ this._actionInfo.set(this.actionInfo());
8141
+ if (!this.purposeType() || !this.isConsiderationNeeded()) {
8142
+ return;
8143
+ }
8144
+ this.isConsideredCorrectControl.setValue(this.actionInfo().considerCorrect, { emitEvent: false });
8145
+ }, { allowSignalWrites: true });
8146
+ }
8147
+ ngOnInit() {
8148
+ this.initActionForm();
8149
+ }
8150
+ initActionForm() {
8151
+ this.actionForm = this.nonNullableFormBuilder.group({
8152
+ photo: this.nonNullableFormBuilder.group({
8153
+ isEnable: this.attachmentPhotoAction().isEnable,
8154
+ isRequired: {
8155
+ value: this.attachmentPhotoAction().isRequired,
8156
+ disabled: !this.attachmentPhotoAction().isEnable
8157
+ }
8158
+ }),
8159
+ comment: this.nonNullableFormBuilder.group({
8160
+ isEnable: this.textAreaAction().isEnable,
8161
+ isRequired: {
8162
+ value: this.textAreaAction().isRequired,
8163
+ disabled: !this.textAreaAction().isEnable
8164
+ }
8165
+ })
8166
+ });
8167
+ this.initActionFormSegmentsSubscriptions();
8168
+ if (!this.isConsiderationNeeded()) {
8169
+ return;
8170
+ }
8171
+ this.isConsideredCorrectControl.setValue(this.actionInfo().considerCorrect, { emitEvent: false });
8172
+ }
8173
+ initActionFormSegmentsSubscriptions() {
8174
+ this.isConsideredCorrectControlSubscription();
8175
+ this.initPhotoGroupSubscription();
8176
+ this.initCommentGroupSubscription();
8177
+ }
8178
+ isConsideredCorrectControlSubscription() {
8179
+ this.isConsideredCorrectControl.valueChanges
8180
+ .pipe(takeUntilDestroyed(this.destroyRef))
8181
+ .subscribe(() => this.consideredCorrectChanged.emit(this._actionInfo().id));
8182
+ }
8183
+ initPhotoGroupSubscription() {
8184
+ this.photoGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
8185
+ if (!value.isEnable) {
8186
+ this.photoGroup.get('isRequired')?.setValue(false, { emitEvent: false });
8187
+ this.photoGroup.get('isRequired')?.disable({ emitEvent: false });
8188
+ this.checkListActionChanged.emit({
8189
+ id: this.attachmentPhotoAction().id,
8190
+ ...this.photoGroup.getRawValue()
8191
+ });
8192
+ return;
8193
+ }
8194
+ this.photoGroup.get('isRequired')?.enable({ emitEvent: false });
8195
+ this.checkListActionChanged.emit({
8196
+ id: this.attachmentPhotoAction().id,
8197
+ ...this.photoGroup.value
8198
+ });
8199
+ });
8200
+ }
8201
+ initCommentGroupSubscription() {
8202
+ this.commentGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
8203
+ if (!value.isEnable) {
8204
+ this.commentGroup.get('isRequired')?.setValue(false, { emitEvent: false });
8205
+ this.commentGroup.get('isRequired')?.disable({ emitEvent: false });
8206
+ this.checkListActionChanged.emit({
8207
+ id: this.textAreaAction().id,
8208
+ ...this.commentGroup.getRawValue()
8209
+ });
8210
+ return;
8211
+ }
8212
+ this.commentGroup.get('isRequired')?.enable({ emitEvent: false });
8213
+ this.checkListActionChanged.emit({
8214
+ id: this.textAreaAction().id,
8215
+ ...this.commentGroup.value
8216
+ });
8217
+ });
8218
+ }
8219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemActionCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiCheckListBlockListItemActionCardComponent, isStandalone: true, selector: "cui-checklist-block-list-item-action-card", inputs: { purposeType: { classPropertyName: "purposeType", publicName: "purposeType", isSignal: true, isRequired: false, transformFunction: null }, isConsiderationNeeded: { classPropertyName: "isConsiderationNeeded", publicName: "isConsiderationNeeded", isSignal: true, isRequired: false, transformFunction: null }, actionInfo: { classPropertyName: "actionInfo", publicName: "actionInfo", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { consideredCorrectChanged: "consideredCorrectChanged", checkListActionChanged: "checkListActionChanged" }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <div\r\n class=\"card\"\r\n [formGroup]=\"actionForm\"\r\n >\r\n <div class=\"title-container\">\r\n <span class=\"title\">{{ actionInfo().title }}</span>\r\n @if (isConsiderationNeeded()) {\r\n <label\r\n cuiLabel\r\n class=\"title__input\"\r\n >\r\n <input\r\n cuiRadio\r\n type=\"radio\"\r\n [checked]=\"actionInfo().considerCorrect\"\r\n [formControl]=\"isConsideredCorrectControl\"\r\n [value]=\"true\"\r\n />\r\n {{ t('CONSIDER_CORRECT') }}\r\n </label>\r\n }\r\n </div>\r\n <div class=\"blocks\">\r\n <div\r\n class=\"block-card\"\r\n [formGroup]=\"photoGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('PHOTO') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n <div\r\n class=\"block-card\"\r\n [formGroup]=\"commentGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('COMMENT') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{flex:1}.card{padding:11px;display:flex;flex-direction:column;gap:10px;border:1px solid var(--cui-base-200);border-radius:8px}.title-container{display:flex;flex-direction:row;gap:8px;justify-content:space-between;align-items:center}.title{font-weight:500;font-size:14px;line-height:20px}.title__input{font-weight:400;font-size:14px;line-height:20px}.blocks{display:flex;flex-direction:column;gap:8px}.block-card{padding:13px 11px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px}.block-card_multiple-lines{flex-direction:column;align-items:unset}.block-card__checkboxes-container{padding:13px 8px;display:flex;gap:12px}\n"], dependencies: [{ kind: "ngmodule", type: CuiCheckboxModule }, { kind: "component", type: CuiCheckboxComponent, selector: "input[type=\"checkbox\"][cuiCheckbox]" }, { kind: "ngmodule", type: CuiFormFieldModule }, { kind: "ngmodule", type: CuiLabelModule }, { kind: "component", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "ngmodule", type: CuiRadioModule }, { kind: "component", type: CuiRadioComponent, selector: "input[type=\"radio\"][cuiRadio]" }, { kind: "ngmodule", type: CuiSelectModule }, { kind: "ngmodule", type: CuiTextareaModule }, { kind: "ngmodule", type: CuiTextFieldControllerModule }, { kind: "ngmodule", type: CuiToggleModule }, { kind: "component", type: CuiToggleComponent, selector: "input[type=\"checkbox\"][cuiToggle]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8221
+ }
8222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemActionCardComponent, decorators: [{
8223
+ type: Component,
8224
+ args: [{ selector: 'cui-checklist-block-list-item-action-card', imports: [
8225
+ CuiCheckboxModule,
8226
+ CuiFormFieldModule,
8227
+ CuiLabelModule,
8228
+ CuiRadioModule,
8229
+ CuiSelectModule,
8230
+ CuiTextareaModule,
8231
+ CuiTextFieldControllerModule,
8232
+ CuiToggleModule,
8233
+ ReactiveFormsModule,
8234
+ TranslocoDirective
8235
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <div\r\n class=\"card\"\r\n [formGroup]=\"actionForm\"\r\n >\r\n <div class=\"title-container\">\r\n <span class=\"title\">{{ actionInfo().title }}</span>\r\n @if (isConsiderationNeeded()) {\r\n <label\r\n cuiLabel\r\n class=\"title__input\"\r\n >\r\n <input\r\n cuiRadio\r\n type=\"radio\"\r\n [checked]=\"actionInfo().considerCorrect\"\r\n [formControl]=\"isConsideredCorrectControl\"\r\n [value]=\"true\"\r\n />\r\n {{ t('CONSIDER_CORRECT') }}\r\n </label>\r\n }\r\n </div>\r\n <div class=\"blocks\">\r\n <div\r\n class=\"block-card\"\r\n [formGroup]=\"photoGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('PHOTO') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n <div\r\n class=\"block-card\"\r\n [formGroup]=\"commentGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('COMMENT') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{flex:1}.card{padding:11px;display:flex;flex-direction:column;gap:10px;border:1px solid var(--cui-base-200);border-radius:8px}.title-container{display:flex;flex-direction:row;gap:8px;justify-content:space-between;align-items:center}.title{font-weight:500;font-size:14px;line-height:20px}.title__input{font-weight:400;font-size:14px;line-height:20px}.blocks{display:flex;flex-direction:column;gap:8px}.block-card{padding:13px 11px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px}.block-card_multiple-lines{flex-direction:column;align-items:unset}.block-card__checkboxes-container{padding:13px 8px;display:flex;gap:12px}\n"] }]
8236
+ }], ctorParameters: () => [] });
8237
+
8238
+ class CuiCheckListBlockListItemActionWithVerificationComponent {
8239
+ constructor() {
8240
+ this.nodeCheckListApiService = inject(CuiNodeChecklistApiService);
8241
+ this.checkListBlockService = inject(CuiCheckListBlockService);
8242
+ this.checkListItem = input.required();
8243
+ }
8244
+ onConsiderCorrectChanged(actionId, purposeType) {
8245
+ const requestData = {
8246
+ nodeCheckListId: this.checkListItem().id,
8247
+ assigneePurposeType: purposeType,
8248
+ actionId
8249
+ };
8250
+ this.nodeCheckListApiService
8251
+ .updateNodeCheckListItemIsConsideredCorrect(requestData)
8252
+ .subscribe((checkListItem) => this.checkListBlockService.updateCheckListItem(checkListItem));
8253
+ }
8254
+ onCheckListActionChanged(actionContent, actionId, purposeType) {
8255
+ const requestData = {
8256
+ nodeCheckListId: this.checkListItem().id,
8257
+ assigneePurposeType: purposeType,
8258
+ actionId,
8259
+ contentId: actionContent.id,
8260
+ isEnable: actionContent.isEnable,
8261
+ isRequired: actionContent.isRequired
8262
+ };
8263
+ this.nodeCheckListApiService
8264
+ .updateNodeCheckListItemActionContent(requestData)
8265
+ .subscribe((checkListItem) => this.checkListBlockService.updateCheckListItem(checkListItem));
8266
+ }
8267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemActionWithVerificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: CuiCheckListBlockListItemActionWithVerificationComponent, isStandalone: true, selector: "cui-checklist-block-list-item-action-with-verification", inputs: { checkListItem: { classPropertyName: "checkListItem", publicName: "checkListItem", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItem().content as checkListItemContent\">\r\n <div class=\"action\">\r\n <div class=\"action__header action__assignee-header\">\r\n {{ t('CONDITIONAL_LOGIC_FOR_ASSIGNEE') | uppercase }}\r\n </div>\r\n <div class=\"action__content\">\r\n <div class=\"cards-container\">\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'ASSIGN'\"\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![0]\"\r\n [isConsiderationNeeded]=\"true\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'ASSIGN')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![0].id, 'ASSIGN')\r\n \"\r\n />\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'ASSIGN'\"\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![1]\"\r\n [isConsiderationNeeded]=\"true\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'ASSIGN')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![1].id, 'ASSIGN')\r\n \"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action\">\r\n <div class=\"action__header action__approver-header\">\r\n {{ t('CONDITIONAL_LOGIC_FOR_APPROVER') | uppercase }}\r\n </div>\r\n <div class=\"action__content\">\r\n <div class=\"cards-container\">\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'APPROVE'\"\r\n [actionInfo]=\"checkListItemContent.actionsApprove![0]\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'APPROVE')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsApprove![0].id, 'APPROVE')\r\n \"\r\n />\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'APPROVE'\"\r\n [actionInfo]=\"checkListItemContent.actionsApprove![1]\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'APPROVE')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsApprove![1].id, 'APPROVE')\r\n \"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{padding-right:15px;padding-left:15px;padding-bottom:15px;display:flex;flex-direction:column;gap:16px;border-radius:inherit}.action{display:flex;flex-direction:column;border:1px solid var(--cui-base-200);border-radius:8px}.action__content{padding:15px;display:flex;flex-direction:column;border-radius:8px;background:var(--cui-base-0);gap:16px}.action__header{font-weight:400;font-size:12px;line-height:14px;padding:15px 19px 15.5px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--cui-base-900);border-bottom:.5px solid var(--cui-base-200);border-radius:8px 8px 0 0}.action__assignee-header{background:var(--cui-badge-warning-bg)}.action__approver-header{background:var(--cui-badge-violet-bg)}.action__estimated-time{display:flex;flex-direction:column;gap:4px}.action__input{padding:11px 13px;border-radius:8px;border:1px solid var(--cui-base-200);background:var(--cui-gray-10);outline:none}.action__input:focus-within{box-shadow:0 0 0 2px var(--cui-blue-100);border-color:var(--cui-blue-600)}.cards-container{display:flex;flex-direction:row;justify-items:center;gap:16px}\n"], dependencies: [{ kind: "component", type: CuiCheckListBlockListItemActionCardComponent, selector: "cui-checklist-block-list-item-action-card", inputs: ["purposeType", "isConsiderationNeeded", "actionInfo"], outputs: ["consideredCorrectChanged", "checkListActionChanged"] }, { kind: "directive", type: CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8269
+ }
8270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemActionWithVerificationComponent, decorators: [{
8271
+ type: Component,
8272
+ args: [{ selector: 'cui-checklist-block-list-item-action-with-verification', imports: [CuiCheckListBlockListItemActionCardComponent, CuiLetDirective, TranslocoDirective, UpperCasePipe], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItem().content as checkListItemContent\">\r\n <div class=\"action\">\r\n <div class=\"action__header action__assignee-header\">\r\n {{ t('CONDITIONAL_LOGIC_FOR_ASSIGNEE') | uppercase }}\r\n </div>\r\n <div class=\"action__content\">\r\n <div class=\"cards-container\">\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'ASSIGN'\"\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![0]\"\r\n [isConsiderationNeeded]=\"true\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'ASSIGN')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![0].id, 'ASSIGN')\r\n \"\r\n />\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'ASSIGN'\"\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![1]\"\r\n [isConsiderationNeeded]=\"true\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'ASSIGN')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![1].id, 'ASSIGN')\r\n \"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action\">\r\n <div class=\"action__header action__approver-header\">\r\n {{ t('CONDITIONAL_LOGIC_FOR_APPROVER') | uppercase }}\r\n </div>\r\n <div class=\"action__content\">\r\n <div class=\"cards-container\">\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'APPROVE'\"\r\n [actionInfo]=\"checkListItemContent.actionsApprove![0]\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'APPROVE')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsApprove![0].id, 'APPROVE')\r\n \"\r\n />\r\n <cui-checklist-block-list-item-action-card\r\n [purposeType]=\"'APPROVE'\"\r\n [actionInfo]=\"checkListItemContent.actionsApprove![1]\"\r\n (consideredCorrectChanged)=\"onConsiderCorrectChanged($event, 'APPROVE')\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsApprove![1].id, 'APPROVE')\r\n \"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{padding-right:15px;padding-left:15px;padding-bottom:15px;display:flex;flex-direction:column;gap:16px;border-radius:inherit}.action{display:flex;flex-direction:column;border:1px solid var(--cui-base-200);border-radius:8px}.action__content{padding:15px;display:flex;flex-direction:column;border-radius:8px;background:var(--cui-base-0);gap:16px}.action__header{font-weight:400;font-size:12px;line-height:14px;padding:15px 19px 15.5px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--cui-base-900);border-bottom:.5px solid var(--cui-base-200);border-radius:8px 8px 0 0}.action__assignee-header{background:var(--cui-badge-warning-bg)}.action__approver-header{background:var(--cui-badge-violet-bg)}.action__estimated-time{display:flex;flex-direction:column;gap:4px}.action__input{padding:11px 13px;border-radius:8px;border:1px solid var(--cui-base-200);background:var(--cui-gray-10);outline:none}.action__input:focus-within{box-shadow:0 0 0 2px var(--cui-blue-100);border-color:var(--cui-blue-600)}.cards-container{display:flex;flex-direction:row;justify-items:center;gap:16px}\n"] }]
8273
+ }] });
8274
+
8275
+ class CuiCheckListBlockListItemActionWithoutVerificationComponent {
8276
+ constructor() {
8277
+ this.nodeCheckListApiService = inject(CuiNodeChecklistApiService);
8278
+ this.checkListBlockService = inject(CuiCheckListBlockService);
8279
+ this.checkListItem = input.required();
8280
+ }
8281
+ onCheckListActionChanged(actionContent, actionId) {
8282
+ const requestData = {
8283
+ nodeCheckListId: this.checkListItem().id,
8284
+ assigneePurposeType: 'ASSIGN',
8285
+ actionId,
8286
+ contentId: actionContent.id,
8287
+ isEnable: actionContent.isEnable,
8288
+ isRequired: actionContent.isRequired
8289
+ };
8290
+ this.nodeCheckListApiService
8291
+ .updateNodeCheckListItemActionContent(requestData)
8292
+ .subscribe((checkListItem) => this.checkListBlockService.updateCheckListItem(checkListItem));
8293
+ }
8294
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemActionWithoutVerificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8295
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: CuiCheckListBlockListItemActionWithoutVerificationComponent, isStandalone: true, selector: "cui-checklist-block-list-item-action-without-verification", inputs: { checkListItem: { classPropertyName: "checkListItem", publicName: "checkListItem", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItem().content as checkListItemContent\">\r\n <div class=\"action\">\r\n <div class=\"action__header\">\r\n {{ t('CONDITIONAL_LOGIC') | uppercase }}\r\n </div>\r\n <div class=\"action__content\">\r\n <div class=\"cards-container\">\r\n <cui-checklist-block-list-item-action-card\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![0]\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![0].id)\r\n \"\r\n />\r\n <cui-checklist-block-list-item-action-card\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![1]\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![1].id)\r\n \"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{padding-right:15px;padding-left:15px;padding-bottom:15px;border-radius:inherit}.action{display:flex;flex-direction:column;border:1px solid var(--cui-base-200);border-radius:8px}.action__content{padding:15px;display:flex;flex-direction:column;border-radius:8px;background:var(--cui-base-0);gap:16px}.action__header{font-weight:400;font-size:12px;line-height:14px;padding:15px 19px 15.5px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--cui-base-900);border-bottom:.5px solid var(--cui-base-200);border-radius:8px 8px 0 0}.cards-container{display:flex;flex-direction:row;justify-items:center;gap:16px}\n"], dependencies: [{ kind: "component", type: CuiCheckListBlockListItemActionCardComponent, selector: "cui-checklist-block-list-item-action-card", inputs: ["purposeType", "isConsiderationNeeded", "actionInfo"], outputs: ["consideredCorrectChanged", "checkListActionChanged"] }, { kind: "directive", type: CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8296
+ }
8297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemActionWithoutVerificationComponent, decorators: [{
8298
+ type: Component,
8299
+ args: [{ selector: 'cui-checklist-block-list-item-action-without-verification', imports: [CuiCheckListBlockListItemActionCardComponent, CuiLetDirective, TranslocoDirective, UpperCasePipe], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItem().content as checkListItemContent\">\r\n <div class=\"action\">\r\n <div class=\"action__header\">\r\n {{ t('CONDITIONAL_LOGIC') | uppercase }}\r\n </div>\r\n <div class=\"action__content\">\r\n <div class=\"cards-container\">\r\n <cui-checklist-block-list-item-action-card\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![0]\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![0].id)\r\n \"\r\n />\r\n <cui-checklist-block-list-item-action-card\r\n [actionInfo]=\"checkListItemContent.actionsAssignee![1]\"\r\n (checkListActionChanged)=\"\r\n onCheckListActionChanged($event, checkListItemContent.actionsAssignee![1].id)\r\n \"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{padding-right:15px;padding-left:15px;padding-bottom:15px;border-radius:inherit}.action{display:flex;flex-direction:column;border:1px solid var(--cui-base-200);border-radius:8px}.action__content{padding:15px;display:flex;flex-direction:column;border-radius:8px;background:var(--cui-base-0);gap:16px}.action__header{font-weight:400;font-size:12px;line-height:14px;padding:15px 19px 15.5px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--cui-base-900);border-bottom:.5px solid var(--cui-base-200);border-radius:8px 8px 0 0}.cards-container{display:flex;flex-direction:row;justify-items:center;gap:16px}\n"] }]
8300
+ }] });
8301
+
8302
+ class CuiChecklistBlockTitleControlComponent {
8303
+ constructor() {
8304
+ this.control = input.required();
8305
+ }
8306
+ get isTitleError() {
8307
+ return this.control().invalid && this.control().dirty;
8308
+ }
8309
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockTitleControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8310
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: CuiChecklistBlockTitleControlComponent, isStandalone: true, selector: "cui-checklist-block-title-control", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <cui-form-field>\r\n <label\r\n cuiLabel\r\n [isRequired]=\"true\"\r\n for=\"title\"\r\n >\r\n {{ t('TITLE') }}\r\n </label>\r\n <cui-input-text\r\n [formControl]=\"control()\"\r\n cuiTextFieldId=\"title\"\r\n [cuiTextFieldIsError]=\"isTitleError\"\r\n cuiTextFieldPlaceholder=\"{{ t('ADD_A_TITLE') }}...\"\r\n />\r\n <cui-general-control-error-hint [control]=\"control()\" />\r\n </cui-form-field>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CuiContextMenuModule }, { kind: "ngmodule", type: CuiFormFieldModule }, { kind: "component", type: CuiFormFieldComponent, selector: "cui-form-field" }, { kind: "ngmodule", type: CuiHintModule }, { kind: "ngmodule", type: CuiInputModule }, { kind: "component", type: CuiInputTextComponent, selector: "cui-input-text" }, { kind: "directive", type: CuiTextFieldIdDirective, selector: "[cuiTextFieldId]", inputs: ["cuiTextFieldId"] }, { kind: "directive", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: ["cuiTextFieldPlaceholder"] }, { kind: "directive", type: CuiTextFieldIsErrorDirective, selector: "[cuiTextFieldIsError]", inputs: ["cuiTextFieldIsError"] }, { kind: "ngmodule", type: CuiLabelModule }, { kind: "component", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "ngmodule", type: CuiTextFieldControllerModule }, { kind: "component", type: CuiGeneralControlErrorHintComponent, selector: "cui-general-control-error-hint", inputs: ["control", "isVisible"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8311
+ }
8312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockTitleControlComponent, decorators: [{
8313
+ type: Component,
8314
+ args: [{ selector: 'cui-checklist-block-title-control', imports: [
8315
+ CuiContextMenuModule,
8316
+ CuiFormFieldModule,
8317
+ CuiHintModule,
8318
+ CuiInputModule,
8319
+ CuiLabelModule,
8320
+ CuiTextFieldControllerModule,
8321
+ CuiGeneralControlErrorHintComponent,
8322
+ ReactiveFormsModule,
8323
+ TranslocoDirective
8324
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <cui-form-field>\r\n <label\r\n cuiLabel\r\n [isRequired]=\"true\"\r\n for=\"title\"\r\n >\r\n {{ t('TITLE') }}\r\n </label>\r\n <cui-input-text\r\n [formControl]=\"control()\"\r\n cuiTextFieldId=\"title\"\r\n [cuiTextFieldIsError]=\"isTitleError\"\r\n cuiTextFieldPlaceholder=\"{{ t('ADD_A_TITLE') }}...\"\r\n />\r\n <cui-general-control-error-hint [control]=\"control()\" />\r\n </cui-form-field>\r\n</ng-container>\r\n" }]
8325
+ }] });
8326
+
8327
+ class CuiChecklistBlockListItemContainerComponent {
8328
+ constructor() {
8329
+ this.destroyRef = inject(DestroyRef);
8330
+ this.nonNullableFormBuilder = inject(NonNullableFormBuilder);
8331
+ this.translocoService = inject(TranslocoService);
8332
+ this.cuiDialogService = inject(CuiDialogService);
8333
+ this.treeStructApiService = inject(CuiTreeStructApiService);
8334
+ this.checkListBlockService = inject(CuiCheckListBlockService);
8335
+ this.nodeCheckListApiService = inject(CuiNodeChecklistApiService);
8336
+ this.DEFAULT_CONTROL_DELAY = 700;
8337
+ this.isOpen = signal(false);
8338
+ this.checkListBlockItem = input.required();
8339
+ this.config = input.required();
8340
+ this.index = input(0);
8341
+ this.componentId = this.checkListBlockService.componentId;
8342
+ this.rotate = computed(() => `rotate(${this.isOpen() ? '0deg' : '-90deg'})`);
8343
+ this.headerText = computed(() => this.checkListItem().title ? this.checkListItem().title : this.translocoService.translate('UNTITLED'));
8344
+ this.checkListItem = computed(() => this.checkListBlockItem().content);
8345
+ this.checkListItemComponent = computed(() => this.checkListBlockItem().component);
8346
+ this.checkListItemWithOptions = computed(() => ({
8347
+ ...this.checkListItem(),
8348
+ options: [
8349
+ {
8350
+ label: this.translocoService.translate('DUPLICATE'),
8351
+ icon: 'cuiIconCopy'
8352
+ },
8353
+ {
8354
+ label: this.translocoService.translate('DELETE'),
8355
+ icon: 'cuiIconTrash',
8356
+ color: 'var(--cui-danger)',
8357
+ command: this.openDeleteChecklistNodeModal.bind(this)
8358
+ }
8359
+ ]
8360
+ }));
8361
+ this.headerBorderColor = computed(() => {
8362
+ const checkListItem = this.checkListItem();
8363
+ if (checkListItem.content.actionsApprove !== null) {
8364
+ return 'var(--cui-violet-bg)';
8365
+ }
8366
+ if ('acceptanceCriteriaEvaluations' in checkListItem.content.actionsAssignee[0]) {
8367
+ return 'var(--cui-cyan-bg)';
8368
+ }
8369
+ return null;
8370
+ });
8371
+ this.iconChecklistType = computed(() => {
8372
+ const checkListItem = this.checkListItem();
8373
+ if (checkListItem.content.actionsApprove !== null) {
8374
+ return 'cuiIconUsersSm';
8375
+ }
8376
+ if ('acceptanceCriteriaEvaluations' in checkListItem.content.actionsAssignee[0]) {
8377
+ return 'cuiIconChecklist';
8378
+ }
8379
+ return 'cuiIconUserSm';
8380
+ });
8381
+ this.titleControl = this.nonNullableFormBuilder.control({ value: '', disabled: true }, cuiCreateDefaultValidators());
8382
+ }
8383
+ get isTitleEmpty() {
8384
+ return !this.titleControl.value;
8385
+ }
8386
+ get isTitleError() {
8387
+ return this.titleControl.invalid && this.titleControl.dirty;
8388
+ }
8389
+ ngOnInit() {
8390
+ this.initControls();
8391
+ }
8392
+ onRowToggle() {
8393
+ this.isOpen.update((prev) => !prev);
8394
+ }
8395
+ onAllowDrag() {
8396
+ this.checkListBlockService.toggleDragPermission(true);
8397
+ }
8398
+ onProhibitDrag() {
8399
+ this.checkListBlockService.toggleDragPermission(false);
8400
+ }
8401
+ initControls() {
8402
+ this.initTitleControlValue();
8403
+ this.initTitleControlSubscription();
8404
+ }
8405
+ initTitleControlValue() {
8406
+ this.titleControl.enable();
8407
+ this.titleControl.setValue(this.checkListItem().title ? this.checkListItem().title : '');
8408
+ }
8409
+ initTitleControlSubscription() {
8410
+ this.titleControl.valueChanges
8411
+ .pipe(debounceTime(this.DEFAULT_CONTROL_DELAY), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
8412
+ .subscribe((titleValue) => {
8413
+ if (this.titleControl.invalid) {
8414
+ return;
8415
+ }
8416
+ this.nodeCheckListApiService
8417
+ .updateNodeCheckListItemTitle(this.checkListItem().id, titleValue)
8418
+ .subscribe(() => {
8419
+ this.checkListBlockService.updateCheckListItem({
8420
+ ...this.checkListItem(),
8421
+ title: titleValue
8422
+ });
8423
+ });
8424
+ });
8425
+ }
8426
+ openDeleteChecklistNodeModal() {
8427
+ const content = ['THIS_ACTION_WILL_PERMANENTLY_DELETE_THE_ITEM_FROM_CHECKLIST'];
8428
+ this.cuiDialogService
8429
+ .open(CuiDeleteModalComponent, {
8430
+ data: {
8431
+ title: 'DELETE_EVALUATION_CHECKLIST_ITEM_QUESTION',
8432
+ content,
8433
+ delete: () => this.treeStructApiService.deleteTreeStructElement(this.componentId(), this.checkListItem().id)
8434
+ }
8435
+ })
8436
+ .subscribe((data) => data?.canceled || this.checkListBlockService.deleteCheckListItem(this.checkListItem().id));
8437
+ }
8438
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockListItemContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8439
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiChecklistBlockListItemContainerComponent, isStandalone: true, selector: "cui-checklist-block-list-item-container", inputs: { checkListBlockItem: { classPropertyName: "checkListBlockItem", publicName: "checkListBlockItem", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItemWithOptions() as checkListItem\">\r\n <header\r\n class=\"header\"\r\n [style.border-left-color]=\"headerBorderColor()\"\r\n [class.header__opened]=\"isOpen()\"\r\n >\r\n <button\r\n class=\"icon-drag\"\r\n cuiButton\r\n cuiDragPointer\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n [icon]=\"'cuiIconDragHandleDots'\"\r\n (mouseenter)=\"onAllowDrag()\"\r\n (mouseleave)=\"onProhibitDrag()\"\r\n ></button>\r\n <button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n [style.transform]=\"rotate()\"\r\n icon=\"cuiIconCaretDownFillXxs\"\r\n (click)=\"onRowToggle()\"\r\n ></button>\r\n <cui-svg\r\n [icon]=\"iconChecklistType()\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n <div class=\"header__content\">\r\n <div class=\"header__numeration\">{{ index() }}.</div>\r\n <div class=\"header__text\">{{ headerText() }}</div>\r\n </div>\r\n @if (isTitleEmpty) {\r\n <cui-svg\r\n [cuiTooltip]=\"t('TITLE_IS_REQUIRED')\"\r\n icon=\"cuiIconAlertTriangle\"\r\n color=\"var(--cui-danger)\"\r\n class=\"icon\"\r\n />\r\n }\r\n <button\r\n #actionButton=\"elementRef\"\r\n cuiButton\r\n type=\"button\"\r\n cuiElement\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconMoreVertical\"\r\n class=\"list__context-menu-button\"\r\n ></button>\r\n <cui-context-menu\r\n [items]=\"checkListItem.options\"\r\n [target]=\"actionButton.nativeElement\"\r\n />\r\n </header>\r\n @if (isOpen()) {\r\n <div class=\"info\">\r\n <cui-checklist-block-title-control [control]=\"titleControl\" />\r\n <cui-editor-block\r\n [config]=\"config()\"\r\n [editorId]=\"checkListItem.textContainerId!\"\r\n [title]=\"titleControl.value\"\r\n />\r\n </div>\r\n <ng-container\r\n [ngComponentOutlet]=\"checkListItemComponent()\"\r\n [ngComponentOutletInputs]=\"{\r\n checkListItem: checkListItem\r\n }\"\r\n />\r\n }\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;gap:16px;border-radius:inherit;background-color:var(--cui-base-0)}.header{padding-right:7px;padding-left:7px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:4px;background:var(--cui-base-0);border-radius:inherit;border-left:6px solid var(--cui-yellow-bg)}.header__content{display:flex;flex-direction:row;align-items:center;gap:8px;flex:1}.header__numeration{font-weight:600;font-size:13px;line-height:16px;padding-right:8px;padding-left:8px;display:flex;justify-content:center;align-items:center}.header__text{font-weight:500;font-size:14px;line-height:20px;padding-top:11px;padding-bottom:11px;flex:1;width:0;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.header__opened{background:var(--cui-badge-info-bg);border-bottom:.5px solid var(--cui-base-200);border-bottom-left-radius:0;border-bottom-right-radius:0}.header:hover{background:var(--cui-base-10)}.info{padding-right:15px;padding-left:15px;display:flex;flex-direction:column;gap:16px}.icon{padding:6px;width:max-content}\n"], dependencies: [{ kind: "directive", type: CuiTooltipDirective, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: ["cuiTooltipContext", "cuiTooltipAppearance", "cuiTooltip"] }, { kind: "component", type: CuiEditorBlockComponent, selector: "cui-editor-block", inputs: ["title", "editorId", "config", "required"], outputs: ["editorEmpty"] }, { kind: "component", type: CuiChecklistBlockTitleControlComponent, selector: "cui-checklist-block-title-control", inputs: ["control"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: CuiContextMenuModule }, { kind: "component", type: CuiContextMenuComponent, selector: "cui-context-menu[items][target]", inputs: ["items", "target"] }, { kind: "directive", type: CuiElementDirective, selector: "[cuiElement]", exportAs: ["elementRef"] }, { kind: "ngmodule", type: CuiLabelModule }, { kind: "directive", type: CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: CuiDragPointerDirective, selector: "[cuiDragPointer]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8440
+ }
8441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockListItemContainerComponent, decorators: [{
8442
+ type: Component,
8443
+ args: [{ selector: 'cui-checklist-block-list-item-container', imports: [
8444
+ CuiTooltip,
8445
+ CuiEditorBlockComponent,
8446
+ CuiChecklistBlockTitleControlComponent,
8447
+ CuiButtonModule,
8448
+ CuiContextMenuModule,
8449
+ CuiElementDirective,
8450
+ CuiLabelModule,
8451
+ CuiLetDirective,
8452
+ CuiSvgModule,
8453
+ NgComponentOutlet,
8454
+ TranslocoDirective,
8455
+ CuiDragPointerDirective
8456
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItemWithOptions() as checkListItem\">\r\n <header\r\n class=\"header\"\r\n [style.border-left-color]=\"headerBorderColor()\"\r\n [class.header__opened]=\"isOpen()\"\r\n >\r\n <button\r\n class=\"icon-drag\"\r\n cuiButton\r\n cuiDragPointer\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n [icon]=\"'cuiIconDragHandleDots'\"\r\n (mouseenter)=\"onAllowDrag()\"\r\n (mouseleave)=\"onProhibitDrag()\"\r\n ></button>\r\n <button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n [style.transform]=\"rotate()\"\r\n icon=\"cuiIconCaretDownFillXxs\"\r\n (click)=\"onRowToggle()\"\r\n ></button>\r\n <cui-svg\r\n [icon]=\"iconChecklistType()\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n <div class=\"header__content\">\r\n <div class=\"header__numeration\">{{ index() }}.</div>\r\n <div class=\"header__text\">{{ headerText() }}</div>\r\n </div>\r\n @if (isTitleEmpty) {\r\n <cui-svg\r\n [cuiTooltip]=\"t('TITLE_IS_REQUIRED')\"\r\n icon=\"cuiIconAlertTriangle\"\r\n color=\"var(--cui-danger)\"\r\n class=\"icon\"\r\n />\r\n }\r\n <button\r\n #actionButton=\"elementRef\"\r\n cuiButton\r\n type=\"button\"\r\n cuiElement\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconMoreVertical\"\r\n class=\"list__context-menu-button\"\r\n ></button>\r\n <cui-context-menu\r\n [items]=\"checkListItem.options\"\r\n [target]=\"actionButton.nativeElement\"\r\n />\r\n </header>\r\n @if (isOpen()) {\r\n <div class=\"info\">\r\n <cui-checklist-block-title-control [control]=\"titleControl\" />\r\n <cui-editor-block\r\n [config]=\"config()\"\r\n [editorId]=\"checkListItem.textContainerId!\"\r\n [title]=\"titleControl.value\"\r\n />\r\n </div>\r\n <ng-container\r\n [ngComponentOutlet]=\"checkListItemComponent()\"\r\n [ngComponentOutletInputs]=\"{\r\n checkListItem: checkListItem\r\n }\"\r\n />\r\n }\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;gap:16px;border-radius:inherit;background-color:var(--cui-base-0)}.header{padding-right:7px;padding-left:7px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:4px;background:var(--cui-base-0);border-radius:inherit;border-left:6px solid var(--cui-yellow-bg)}.header__content{display:flex;flex-direction:row;align-items:center;gap:8px;flex:1}.header__numeration{font-weight:600;font-size:13px;line-height:16px;padding-right:8px;padding-left:8px;display:flex;justify-content:center;align-items:center}.header__text{font-weight:500;font-size:14px;line-height:20px;padding-top:11px;padding-bottom:11px;flex:1;width:0;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.header__opened{background:var(--cui-badge-info-bg);border-bottom:.5px solid var(--cui-base-200);border-bottom-left-radius:0;border-bottom-right-radius:0}.header:hover{background:var(--cui-base-10)}.info{padding-right:15px;padding-left:15px;display:flex;flex-direction:column;gap:16px}.icon{padding:6px;width:max-content}\n"] }]
8457
+ }] });
8458
+
8459
+ class CuiCheckListBlockListItemEvaluationCriteriaComponent {
8460
+ get isEvaluationInvalid() {
8461
+ return this.criteriaGroup().controls.evaluation.invalid && this.isEditMode();
8462
+ }
8463
+ get isCriteriaInvalid() {
8464
+ return this.criteriaGroup().controls.criteria.invalid && this.isEditMode();
8465
+ }
8466
+ constructor() {
8467
+ this.cuiAlertService = inject(CuiAlertService);
8468
+ this.translocoService = inject(TranslocoService);
8469
+ this.EVALUATION_ALREADY_EXIST = `EVALUATION_ALREADY_EXIST`;
8470
+ this.previousData = null;
8471
+ this.isEditMode = signal(false);
8472
+ this.isNew = computed(() => this.criteriaGroup().controls.isNew.value);
8473
+ this.gap = computed(() => (this.isEditMode() ? 8 : 0));
8474
+ this.isLoading = computed(() => this.loadingIds()[this.criteriaGroup().controls.id.value]);
8475
+ this.isDragEnabled = computed(() => !this.isEditMode() && !this.isLoading());
8476
+ this.loadingIds = input.required();
8477
+ this.index = input.required();
8478
+ this.criteriaGroup = input.required();
8479
+ this.evaluationCriteriaFormArray = input.required();
8480
+ this.saveClicked = output();
8481
+ this.deleteClicked = output();
8482
+ this.cancelClicked = output();
8483
+ this.initNewEvaluationCriteriaEffect();
8484
+ this.initEditModeEffect();
8485
+ }
8486
+ onSave() {
8487
+ if (this.criteriaGroup().invalid) {
8488
+ return;
8489
+ }
8490
+ const evaluation = `${this.criteriaGroup().controls.evaluation.value}`;
8491
+ if (this.checkIsEvaluationCriteriaExist(evaluation)) {
8492
+ this.cuiAlertService
8493
+ .open(this.translocoService.translate(this.EVALUATION_ALREADY_EXIST, { evaluation }), {
8494
+ status: 'error'
8495
+ })
8496
+ .subscribe();
8497
+ return;
8498
+ }
8499
+ this.isEditMode.update((prev) => !prev);
8500
+ this.saveClicked.emit(this.criteriaGroup().controls);
8501
+ }
8502
+ onDelete() {
8503
+ const id = this.criteriaGroup().controls.id.value;
8504
+ this.deleteClicked.emit(id);
8505
+ }
8506
+ onCancel() {
8507
+ if (this.isNew()) {
8508
+ this.cancelClicked.emit();
8509
+ }
8510
+ this.isEditMode.update((prev) => !prev);
8511
+ if (!this.previousData) {
8512
+ return;
8513
+ }
8514
+ this.criteriaGroup().setValue({
8515
+ ...this.criteriaGroup().getRawValue(),
8516
+ ...this.previousData
8517
+ });
8518
+ }
8519
+ onToggleEditMode() {
8520
+ const { criteria, evaluation } = this.criteriaGroup().getRawValue();
8521
+ this.previousData = { criteria, evaluation };
8522
+ this.isEditMode.update((prev) => !prev);
8523
+ }
8524
+ // TODO: Компонент должен был быть построен исключительно на реактивных формах
8525
+ initEditModeEffect() {
8526
+ effect(() => this.criteriaGroup()[this.isEditMode() ? 'enable' : 'disable']());
8527
+ }
8528
+ initNewEvaluationCriteriaEffect() {
8529
+ effect(() => this.isEditMode.set(this.isNew()), { allowSignalWrites: true });
8530
+ }
8531
+ checkIsEvaluationCriteriaExist(evaluation) {
8532
+ const controls = this.evaluationCriteriaFormArray().controls;
8533
+ return controls.some((control) => {
8534
+ if (control.controls.id.value === this.criteriaGroup().controls.id.value) {
8535
+ return false;
8536
+ }
8537
+ return `${control.get('evaluation')?.value}` === evaluation;
8538
+ });
8539
+ }
8540
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemEvaluationCriteriaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8541
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiCheckListBlockListItemEvaluationCriteriaComponent, isStandalone: true, selector: "li[cuiChecklistBlockListItemEvaluationCriteria]", inputs: { loadingIds: { classPropertyName: "loadingIds", publicName: "loadingIds", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, criteriaGroup: { classPropertyName: "criteriaGroup", publicName: "criteriaGroup", isSignal: true, isRequired: true, transformFunction: null }, evaluationCriteriaFormArray: { classPropertyName: "evaluationCriteriaFormArray", publicName: "evaluationCriteriaFormArray", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { saveClicked: "saveClicked", deleteClicked: "deleteClicked", cancelClicked: "cancelClicked" }, ngImport: i0, template: "<div *transloco=\"let t\">\r\n <form\r\n *cuiLet=\"criteriaGroup() as form\"\r\n [formGroup]=\"form\"\r\n [class.form_edit]=\"isEditMode()\"\r\n clas=\"form\"\r\n >\r\n <div class=\"content\">\r\n <span class=\"index\">{{ index() }}.</span>\r\n @if (!isEditMode()) {\r\n <cui-svg\r\n cuiDragPointer\r\n icon=\"cuiIconDragHandleDots\"\r\n color=\"var(--cui-base-500)\"\r\n class=\"icon\"\r\n />\r\n }\r\n <div\r\n style.gap=\"{{gap()}}px\"\r\n class=\"wrapper\"\r\n >\r\n <cui-input-number\r\n formControlName=\"evaluation\"\r\n cuiTextFieldPlaceholder=\"0\"\r\n [cuiTextFieldIsError]=\"isEvaluationInvalid\"\r\n [min]=\"1\"\r\n [max]=\"99\"\r\n class=\"input-number\"\r\n />\r\n <textarea\r\n cuiTextarea\r\n formControlName=\"criteria\"\r\n [rows]=\"1\"\r\n [cuiTextFieldIsError]=\"isCriteriaInvalid\"\r\n placeholder=\"{{ t('ADD_A_DESCRIPTION') }}...\"\r\n class=\"textarea\"\r\n ></textarea>\r\n </div>\r\n @if (isEditMode()) {\r\n <button\r\n type=\"submit\"\r\n cuiIconButton\r\n icon=\"cuiIconCheck\"\r\n color=\"var(--cui-success)\"\r\n [disabled]=\"form.invalid\"\r\n class=\"button\"\r\n (click)=\"onSave()\"\r\n ></button>\r\n <button\r\n type=\"button\"\r\n cuiIconButton\r\n icon=\"cuiIconXCircle\"\r\n color=\"var(--cui-danger)\"\r\n class=\"button\"\r\n (click)=\"onCancel()\"\r\n ></button>\r\n } @else {\r\n <button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconEdit\"\r\n [disabled]=\"isLoading()\"\r\n (click)=\"onToggleEditMode()\"\r\n ></button>\r\n <button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconTrash\"\r\n [isLoaderShown]=\"isLoading()\"\r\n (click)=\"onDelete()\"\r\n ></button>\r\n }\r\n </div>\r\n <cui-general-control-error-hint\r\n [control]=\"form.controls.criteria\"\r\n class=\"error-hint\"\r\n />\r\n </form>\r\n</div>\r\n", styles: [".form{display:flex;flex-direction:column;gap:8px}.form_edit{padding:12px;border-radius:8px;border:1px solid var(--cui-base-200);background-color:var(--cui-base-0)}.content{display:flex;gap:8px;align-items:center}.index{font-weight:500;font-size:14px;line-height:20px;width:22px}.icon{cursor:grab}.icon:active{cursor:grabbing}.wrapper{display:flex;flex-grow:1}.input-number{padding-right:9px;padding-left:9px;flex-shrink:0;width:44px;background:inherit}.input-number._disabled{cursor:initial;opacity:1;border-right-width:0;border-radius:8px 0 0 8px}.input-number ::ng-deep .c-input{text-align:center}.input-number ::ng-deep .c-input:disabled{cursor:text}.textarea{background:var(--cui-base-0)}.textarea:disabled{cursor:initial;opacity:1;background:var(--cui-base-0);border-left-width:0;border-radius:0 8px 8px 0}.button:disabled{cursor:not-allowed;opacity:.5}.error-hint{margin-left:82px}.cc-drag-drop-placeholder{height:44px;border:1px dashed var(--cui-base-200);border-radius:8px;background:var(--cui-base-0)}\n"], dependencies: [{ kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: CuiIconButtonModule }, { kind: "component", type: CuiIconButtonComponent, selector: "button[cuiIconButton][icon], a[cuiIconButton][icon]", inputs: ["icon", "color", "hoverColor"] }, { kind: "ngmodule", type: CuiInputModule }, { kind: "directive", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: ["cuiTextFieldPlaceholder"] }, { kind: "directive", type: CuiTextFieldIsErrorDirective, selector: "[cuiTextFieldIsError]", inputs: ["cuiTextFieldIsError"] }, { kind: "directive", type: CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "ngmodule", type: CuiTextareaModule }, { kind: "component", type: CuiTextareaComponent, selector: "textarea[cuiTextarea]", inputs: ["rows", "noBordersAndPaddings"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: CuiInputNumberModule }, { kind: "component", type: CuiInputNumberComponent, selector: "cui-input-number", inputs: ["precision", "min", "max"] }, { kind: "directive", type: CuiDragPointerDirective, selector: "[cuiDragPointer]" }, { kind: "component", type: CuiGeneralControlErrorHintComponent, selector: "cui-general-control-error-hint", inputs: ["control", "isVisible"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8542
+ }
8543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemEvaluationCriteriaComponent, decorators: [{
8544
+ type: Component,
8545
+ args: [{ selector: 'li[cuiChecklistBlockListItemEvaluationCriteria]', imports: [
8546
+ CuiButtonModule,
8547
+ CuiIconButtonModule,
8548
+ CuiInputModule,
8549
+ CuiLetDirective,
8550
+ CuiSvgModule,
8551
+ CuiTextareaModule,
8552
+ ReactiveFormsModule,
8553
+ TranslocoDirective,
8554
+ CuiInputNumberModule,
8555
+ CuiDragPointerDirective,
8556
+ CuiGeneralControlErrorHintComponent
8557
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *transloco=\"let t\">\r\n <form\r\n *cuiLet=\"criteriaGroup() as form\"\r\n [formGroup]=\"form\"\r\n [class.form_edit]=\"isEditMode()\"\r\n clas=\"form\"\r\n >\r\n <div class=\"content\">\r\n <span class=\"index\">{{ index() }}.</span>\r\n @if (!isEditMode()) {\r\n <cui-svg\r\n cuiDragPointer\r\n icon=\"cuiIconDragHandleDots\"\r\n color=\"var(--cui-base-500)\"\r\n class=\"icon\"\r\n />\r\n }\r\n <div\r\n style.gap=\"{{gap()}}px\"\r\n class=\"wrapper\"\r\n >\r\n <cui-input-number\r\n formControlName=\"evaluation\"\r\n cuiTextFieldPlaceholder=\"0\"\r\n [cuiTextFieldIsError]=\"isEvaluationInvalid\"\r\n [min]=\"1\"\r\n [max]=\"99\"\r\n class=\"input-number\"\r\n />\r\n <textarea\r\n cuiTextarea\r\n formControlName=\"criteria\"\r\n [rows]=\"1\"\r\n [cuiTextFieldIsError]=\"isCriteriaInvalid\"\r\n placeholder=\"{{ t('ADD_A_DESCRIPTION') }}...\"\r\n class=\"textarea\"\r\n ></textarea>\r\n </div>\r\n @if (isEditMode()) {\r\n <button\r\n type=\"submit\"\r\n cuiIconButton\r\n icon=\"cuiIconCheck\"\r\n color=\"var(--cui-success)\"\r\n [disabled]=\"form.invalid\"\r\n class=\"button\"\r\n (click)=\"onSave()\"\r\n ></button>\r\n <button\r\n type=\"button\"\r\n cuiIconButton\r\n icon=\"cuiIconXCircle\"\r\n color=\"var(--cui-danger)\"\r\n class=\"button\"\r\n (click)=\"onCancel()\"\r\n ></button>\r\n } @else {\r\n <button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconEdit\"\r\n [disabled]=\"isLoading()\"\r\n (click)=\"onToggleEditMode()\"\r\n ></button>\r\n <button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n icon=\"cuiIconTrash\"\r\n [isLoaderShown]=\"isLoading()\"\r\n (click)=\"onDelete()\"\r\n ></button>\r\n }\r\n </div>\r\n <cui-general-control-error-hint\r\n [control]=\"form.controls.criteria\"\r\n class=\"error-hint\"\r\n />\r\n </form>\r\n</div>\r\n", styles: [".form{display:flex;flex-direction:column;gap:8px}.form_edit{padding:12px;border-radius:8px;border:1px solid var(--cui-base-200);background-color:var(--cui-base-0)}.content{display:flex;gap:8px;align-items:center}.index{font-weight:500;font-size:14px;line-height:20px;width:22px}.icon{cursor:grab}.icon:active{cursor:grabbing}.wrapper{display:flex;flex-grow:1}.input-number{padding-right:9px;padding-left:9px;flex-shrink:0;width:44px;background:inherit}.input-number._disabled{cursor:initial;opacity:1;border-right-width:0;border-radius:8px 0 0 8px}.input-number ::ng-deep .c-input{text-align:center}.input-number ::ng-deep .c-input:disabled{cursor:text}.textarea{background:var(--cui-base-0)}.textarea:disabled{cursor:initial;opacity:1;background:var(--cui-base-0);border-left-width:0;border-radius:0 8px 8px 0}.button:disabled{cursor:not-allowed;opacity:.5}.error-hint{margin-left:82px}.cc-drag-drop-placeholder{height:44px;border:1px dashed var(--cui-base-200);border-radius:8px;background:var(--cui-base-0)}\n"] }]
8558
+ }], ctorParameters: () => [] });
8559
+
8560
+ class CuiCheckListBlockListItemEvaluationComponent {
8561
+ constructor() {
8562
+ this.nonNullableFormBuilder = inject(NonNullableFormBuilder);
8563
+ this.nodeCheckListApiService = inject(CuiNodeChecklistApiService);
8564
+ this.checkListBlockService = inject(CuiCheckListBlockService);
8565
+ this.cdRef = inject(ChangeDetectorRef);
8566
+ this.cuiDialogService = inject(CuiDialogService);
8567
+ this.isAvailableObserver = new Subject();
8568
+ this.photoFormGroup = this.nonNullableFormBuilder.group({
8569
+ isEnable: false,
8570
+ isRequired: {
8571
+ value: false,
8572
+ disabled: true
8573
+ }
8574
+ });
8575
+ this.commentFormGroup = this.nonNullableFormBuilder.group({
8576
+ isEnable: false,
8577
+ isRequired: {
8578
+ value: false,
8579
+ disabled: true
8580
+ }
8581
+ });
8582
+ this.evaluationCriteriaFormArray = this.nonNullableFormBuilder.array([]);
8583
+ this.loadingIds = signal({});
8584
+ this.isAddButtonDisabled = signal(false);
8585
+ this.assignee = computed(() => this.checkListItem().content.actionsAssignee[0]);
8586
+ this.attachmentPhotoAction = computed(() => this.assignee().actions.find((contentAction) => contentAction.contentActionType === 'ATTACHMENT_PHOTO'));
8587
+ this.textAreaAction = computed(() => this.assignee().actions.find((contentAction) => contentAction.contentActionType === 'TEXT_AREA'));
8588
+ this.checkListItem = input.required();
8589
+ }
8590
+ getPointer(currentIndex) {
8591
+ return currentIndex === 0
8592
+ ? "BEFORE" /* NodeCheckListItemSwitchContentPointer.BEFORE */
8593
+ : "AFTER" /* NodeCheckListItemSwitchContentPointer.AFTER */;
8594
+ }
8595
+ getTargetIndex(currentIndex) {
8596
+ return currentIndex === 0 ? 1 : currentIndex - 1;
8597
+ }
8598
+ onDrop(event) {
8599
+ const { prevIndex, index } = event;
8600
+ if (prevIndex === index) {
8601
+ return;
8602
+ }
8603
+ this.moveItemInArray(this.evaluationCriteriaFormArray.controls, prevIndex, index);
8604
+ const movingElementId = this.evaluationCriteriaFormArray.at(index).value.id;
8605
+ const targetItemId = this.evaluationCriteriaFormArray.at(this.getTargetIndex(index)).value.id;
8606
+ const pointer = this.getPointer(index);
8607
+ const requestBody = {
8608
+ nodeCheckListId: this.checkListItem().id,
8609
+ listEvaluationId: this.assignee().id,
8610
+ movingElementId,
8611
+ targetItemId,
8612
+ pointer
8613
+ };
8614
+ this.nodeCheckListApiService.updateNodeCheckListItemSwitchContent(requestBody).subscribe({
8615
+ error: () => {
8616
+ this.moveItemInArray(this.evaluationCriteriaFormArray.controls, index, prevIndex);
8617
+ this.cdRef.markForCheck();
8618
+ }
8619
+ });
8620
+ }
8621
+ onAddEvaluationCriteriaItem() {
8622
+ const evaluationItemControl = this.createEvaluationFormGroup();
8623
+ this.isAddButtonDisabled.set(true);
8624
+ this.evaluationCriteriaFormArray.push(evaluationItemControl);
8625
+ }
8626
+ onSaveEvaluationCriteria(group) {
8627
+ const isNew = group.isNew.value;
8628
+ if (isNew) {
8629
+ this.addEvaluationCriteria(group);
8630
+ return;
8631
+ }
8632
+ this.updateEvaluationCriteria(group);
8633
+ }
8634
+ onCancelNewEvaluationCriteria() {
8635
+ const lastIndex = this.evaluationCriteriaFormArray.length - 1;
8636
+ this.isAddButtonDisabled.set(false);
8637
+ this.evaluationCriteriaFormArray.removeAt(lastIndex);
8638
+ }
8639
+ openModalDeleteEvaluationCriteria(id) {
8640
+ const content = ['DELETE_EVALUATION_CHECKLIST_ITEM_CONFIRMATION_TEXT'];
8641
+ const criteria = this.findExistingEvaluationCriteria(id);
8642
+ if (!criteria?.id) {
8643
+ return;
8644
+ }
8645
+ this.loadingIds.update((ids) => ({ ...ids, [criteria.id]: true }));
8646
+ this.cuiDialogService
8647
+ .open(CuiDeleteModalComponent, {
8648
+ data: {
8649
+ title: 'DELETE_EVALUATION_CHECKLIST_ITEM',
8650
+ content,
8651
+ delete: () => this.nodeCheckListApiService
8652
+ .deleteEvaluationCriteriaItem(this.checkListItem().id, this.assignee().id, criteria.id)
8653
+ .pipe(switchMap((checkListItem) => {
8654
+ const index = this.evaluationCriteriaFormArray.controls.findIndex((control) => control.value.id === id);
8655
+ this.checkListBlockService.updateCheckListItem(checkListItem);
8656
+ this.evaluationCriteriaFormArray.removeAt(index);
8657
+ return of(null);
8658
+ }))
8659
+ }
8660
+ })
8661
+ .subscribe(() => this.completeEvaluationCriteriaDeletion(criteria));
8662
+ }
8663
+ completeEvaluationCriteriaDeletion(criteria) {
8664
+ this.loadingIds.update((ids) => {
8665
+ delete ids[criteria.id];
8666
+ return { ...ids };
8667
+ });
8668
+ }
8669
+ onCheckListActionChanged(actionId, actionContent) {
8670
+ const requestData = {
8671
+ nodeCheckListId: this.checkListItem().id,
8672
+ assigneePurposeType: 'ASSIGN',
8673
+ actionId,
8674
+ contentId: actionContent.id,
8675
+ isEnable: actionContent.isEnable,
8676
+ isRequired: actionContent.isRequired
8677
+ };
8678
+ this.nodeCheckListApiService.updateNodeCheckListItemActionContent(requestData).subscribe((checkListItem) => {
8679
+ this.checkListBlockService.updateCheckListItem(checkListItem);
8680
+ });
8681
+ }
8682
+ ngOnInit() {
8683
+ this.initEvaluationFormValues();
8684
+ }
8685
+ initEvaluationFormValues() {
8686
+ this.evaluationCriteriaFormArray.clear();
8687
+ this.photoFormGroup.patchValue({
8688
+ isEnable: this.attachmentPhotoAction().isEnable,
8689
+ isRequired: this.attachmentPhotoAction().isRequired
8690
+ });
8691
+ this.commentFormGroup.patchValue({
8692
+ isEnable: this.textAreaAction().isEnable,
8693
+ isRequired: this.textAreaAction().isRequired
8694
+ });
8695
+ if (this.attachmentPhotoAction().isEnable) {
8696
+ this.photoFormGroup.controls.isRequired.enable();
8697
+ }
8698
+ if (this.textAreaAction().isEnable) {
8699
+ this.commentFormGroup.controls.isRequired.enable();
8700
+ }
8701
+ this.initActionFormSegmentsSubscriptions();
8702
+ this.assignee().acceptanceCriteriaEvaluations.forEach((evaluationCriteria) => {
8703
+ const evaluationItemControl = this.createEvaluationFormGroup({
8704
+ isNew: false,
8705
+ criteria: evaluationCriteria.criteria,
8706
+ evaluation: evaluationCriteria.evaluation,
8707
+ id: evaluationCriteria.id
8708
+ });
8709
+ this.evaluationCriteriaFormArray.push(evaluationItemControl);
8710
+ });
8711
+ }
8712
+ initActionFormSegmentsSubscriptions() {
8713
+ this.initPhotoGroupSubscription();
8714
+ this.initCommentGroupSubscription();
8715
+ }
8716
+ initPhotoGroupSubscription() {
8717
+ this.photoFormGroup.valueChanges.pipe(takeUntil(this.isAvailableObserver)).subscribe((value) => {
8718
+ if (!value.isEnable) {
8719
+ this.photoFormGroup.get('isRequired')?.setValue(false, { emitEvent: false });
8720
+ this.photoFormGroup.get('isRequired')?.disable({ emitEvent: false });
8721
+ this.onCheckListActionChanged(this.assignee().id, {
8722
+ id: this.attachmentPhotoAction().id,
8723
+ contentActionType: this.attachmentPhotoAction().contentActionType,
8724
+ ...this.photoFormGroup.getRawValue()
8725
+ });
8726
+ return;
8727
+ }
8728
+ this.photoFormGroup.get('isRequired')?.enable({ emitEvent: false });
8729
+ this.onCheckListActionChanged(this.assignee().id, {
8730
+ id: this.attachmentPhotoAction().id,
8731
+ contentActionType: this.attachmentPhotoAction().contentActionType,
8732
+ ...this.photoFormGroup.getRawValue()
8733
+ });
8734
+ });
8735
+ }
8736
+ initCommentGroupSubscription() {
8737
+ this.commentFormGroup.valueChanges.pipe(takeUntil(this.isAvailableObserver)).subscribe((value) => {
8738
+ if (!value.isEnable) {
8739
+ this.commentFormGroup.get('isRequired')?.setValue(false, { emitEvent: false });
8740
+ this.commentFormGroup.get('isRequired')?.disable({ emitEvent: false });
8741
+ this.onCheckListActionChanged(this.assignee().id, {
8742
+ id: this.textAreaAction().id,
8743
+ contentActionType: this.textAreaAction().contentActionType,
8744
+ ...this.commentFormGroup.getRawValue()
8745
+ });
8746
+ return;
8747
+ }
8748
+ this.commentFormGroup.get('isRequired')?.enable({ emitEvent: false });
8749
+ this.onCheckListActionChanged(this.assignee().id, {
8750
+ id: this.textAreaAction().id,
8751
+ contentActionType: this.textAreaAction().contentActionType,
8752
+ ...this.commentFormGroup.getRawValue()
8753
+ });
8754
+ });
8755
+ }
8756
+ updateEvaluationCriteria(group) {
8757
+ const evaluation = group.evaluation.value;
8758
+ const criteria = group.criteria.value;
8759
+ const id = group.id.value;
8760
+ this.nodeCheckListApiService
8761
+ .updateEvaluationCriteriaItem(this.checkListItem().id, this.assignee().id, id, criteria, evaluation)
8762
+ .subscribe((checkListItem) => this.checkListBlockService.updateCheckListItem(checkListItem));
8763
+ }
8764
+ addEvaluationCriteria(group) {
8765
+ const evaluation = group.evaluation.value;
8766
+ const criteria = group.criteria.value;
8767
+ this.nodeCheckListApiService
8768
+ .addEvaluationCriteriaItem(this.checkListItem().id, this.assignee().id, criteria, evaluation)
8769
+ .pipe(finalize(() => this.isAddButtonDisabled.set(false)))
8770
+ .subscribe((checkListItem) => this.updateCreatedEvaluationCriteria(checkListItem));
8771
+ }
8772
+ updateCreatedEvaluationCriteria(checkListItem) {
8773
+ const acceptanceCriteriaEvaluations = checkListItem.content.actionsAssignee[0].acceptanceCriteriaEvaluations;
8774
+ const id = acceptanceCriteriaEvaluations.at(-1)?.id;
8775
+ const control = this.evaluationCriteriaFormArray.controls.at(-1)?.getRawValue();
8776
+ const createdControl = this.createEvaluationFormGroup({ ...control, id, isNew: false });
8777
+ this.evaluationCriteriaFormArray.removeAt(-1);
8778
+ this.evaluationCriteriaFormArray.push(createdControl);
8779
+ this.checkListBlockService.updateCheckListItem(checkListItem);
8780
+ }
8781
+ createEvaluationFormGroup({ id, criteria = '', evaluation = null, isNew = true } = {}) {
8782
+ return this.nonNullableFormBuilder.group({
8783
+ id: [id],
8784
+ criteria: [criteria, cuiCreateDefaultValidators({ maxLength: 500 })],
8785
+ evaluation: [evaluation, [Validators.required]],
8786
+ isNew: [isNew]
8787
+ });
8788
+ }
8789
+ findExistingEvaluationCriteria(id) {
8790
+ return (this.assignee().acceptanceCriteriaEvaluations.find((evaluationCriteria) => evaluationCriteria.id === id) || null);
8791
+ }
8792
+ moveItemInArray(array, fromIndex, toIndex) {
8793
+ if (fromIndex === toIndex) {
8794
+ return;
8795
+ }
8796
+ const item = array[fromIndex];
8797
+ array.splice(fromIndex, 1);
8798
+ array.splice(toIndex, 0, item);
8799
+ }
8800
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemEvaluationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8801
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiCheckListBlockListItemEvaluationComponent, isStandalone: true, selector: "cui-checklist-block-list-item-evaluation", inputs: { checkListItem: { classPropertyName: "checkListItem", publicName: "checkListItem", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <div class=\"action\">\r\n <div class=\"action__inputs-container\">\r\n <div\r\n class=\"action__input\"\r\n [formGroup]=\"photoFormGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('PHOTO') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n <div\r\n class=\"action__input\"\r\n [formGroup]=\"commentFormGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('COMMENT') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"action__criteria-title-container\">\r\n <label\r\n cuiLabel\r\n [isRequired]=\"true\"\r\n for=\"evaluationCriteria\"\r\n >\r\n {{ t('EVALUATION_CRITERIA') }}\r\n </label>\r\n <p class=\"action__criteria-subtitle\">{{ t('EACH_EVALUATION_CRITERION_SHOULD_BE') }}</p>\r\n </div>\r\n <ul\r\n cuiDragList\r\n class=\"list\"\r\n >\r\n @for (control of evaluationCriteriaFormArray.controls; track control.controls['id']; let index = $index) {\r\n <li\r\n cuiChecklistBlockListItemEvaluationCriteria\r\n [index]=\"index + 1\"\r\n cuiDragDrop\r\n [disabled]=\"isAddButtonDisabled()\"\r\n (elementDragged)=\"onDrop($event)\"\r\n [criteriaGroup]=\"control\"\r\n [evaluationCriteriaFormArray]=\"evaluationCriteriaFormArray\"\r\n [loadingIds]=\"loadingIds()\"\r\n (saveClicked)=\"onSaveEvaluationCriteria($event)\"\r\n (cancelClicked)=\"onCancelNewEvaluationCriteria()\"\r\n (deleteClicked)=\"openModalDeleteEvaluationCriteria($event)\"\r\n ></li>\r\n } @empty {\r\n <li\r\n cuiEmptyState\r\n [subtitle]=\"t('NO_EVALUATION_CRITERIA_TO_VIEW')\"\r\n ></li>\r\n }\r\n </ul>\r\n <div class=\"action__footer\">\r\n <button\r\n cuiButton\r\n size=\"xxs\"\r\n appearance=\"flat\"\r\n icon=\"cuiIconPlus\"\r\n type=\"button\"\r\n [disabled]=\"isAddButtonDisabled()\"\r\n (click)=\"onAddEvaluationCriteriaItem()\"\r\n >\r\n {{ t('NEW_OPTION') }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;border-radius:inherit}.action{padding:15px;display:flex;flex-direction:column;border-radius:0 0 8px 8px;gap:16px;background:var(--cui-base-10)}.action__criteria-title-container{display:flex;flex-direction:column;gap:4px}.action__criteria-subtitle{font-weight:400;font-size:14px;line-height:20px;color:var(--cui-base-500)}.action__inputs-container{display:flex;flex-direction:column;gap:8px;background:var(--cui-base-0)}.action__input{padding-right:11px;padding-left:11px;display:flex;height:48px;flex-direction:row;justify-content:space-between;border:1px solid var(--cui-base-200);border-radius:8px}.action__criteria{display:flex;flex-direction:row;align-items:center;gap:12px}.action__criteria-index{padding:8px;font-weight:500;font-size:14px;line-height:20px;display:flex;width:44px;flex-direction:row;justify-content:center;align-items:center;border-radius:8px;background-color:var(--cui-base-0)}.action__criteria-input{flex:1;background:var(--cui-base-0)}.list{display:flex;flex-direction:column;gap:8px}\n"], dependencies: [{ kind: "component", type: CuiCheckListBlockListItemEvaluationCriteriaComponent, selector: "li[cuiChecklistBlockListItemEvaluationCriteria]", inputs: ["loadingIds", "index", "criteriaGroup", "evaluationCriteriaFormArray"], outputs: ["saveClicked", "deleteClicked", "cancelClicked"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: CuiCheckboxModule }, { kind: "component", type: CuiCheckboxComponent, selector: "input[type=\"checkbox\"][cuiCheckbox]" }, { kind: "ngmodule", type: CuiContextMenuModule }, { kind: "ngmodule", type: CuiHintModule }, { kind: "ngmodule", type: CuiInputModule }, { kind: "ngmodule", type: CuiLabelModule }, { kind: "component", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: ["isRequired"] }, { kind: "ngmodule", type: CuiTextareaModule }, { kind: "ngmodule", type: CuiTextFieldControllerModule }, { kind: "ngmodule", type: CuiToggleModule }, { kind: "component", type: CuiToggleComponent, selector: "input[type=\"checkbox\"][cuiToggle]" }, { kind: "component", type: CuiEmptyStateComponent, selector: "cui-empty-state, [cuiEmptyState]", inputs: ["title", "subtitle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: CuiDragDropDirective, selector: "[cuiDragDrop]", inputs: ["disabled"], outputs: ["elementDragged"] }, { kind: "directive", type: CuiDragListDirective, selector: "[cuiDragList]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8802
+ }
8803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiCheckListBlockListItemEvaluationComponent, decorators: [{
8804
+ type: Component,
8805
+ args: [{ selector: 'cui-checklist-block-list-item-evaluation', imports: [
8806
+ CuiCheckListBlockListItemEvaluationCriteriaComponent,
8807
+ CuiButtonModule,
8808
+ CuiCheckboxModule,
8809
+ CuiContextMenuModule,
8810
+ CuiHintModule,
8811
+ CuiInputModule,
8812
+ CuiLabelModule,
8813
+ CuiTextareaModule,
8814
+ CuiTextFieldControllerModule,
8815
+ CuiToggleModule,
8816
+ CuiEmptyStateComponent,
8817
+ ReactiveFormsModule,
8818
+ TranslocoDirective,
8819
+ CuiDragDropDirective,
8820
+ CuiDragListDirective
8821
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <div class=\"action\">\r\n <div class=\"action__inputs-container\">\r\n <div\r\n class=\"action__input\"\r\n [formGroup]=\"photoFormGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('PHOTO') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n <div\r\n class=\"action__input\"\r\n [formGroup]=\"commentFormGroup\"\r\n >\r\n <label cuiLabel>\r\n <input\r\n cuiCheckbox\r\n type=\"checkbox\"\r\n formControlName=\"isEnable\"\r\n />\r\n {{ t('COMMENT') }}\r\n </label>\r\n <label cuiLabel>\r\n <input\r\n cuiToggle\r\n type=\"checkbox\"\r\n formControlName=\"isRequired\"\r\n />\r\n {{ t('REQUIRED') }}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"action__criteria-title-container\">\r\n <label\r\n cuiLabel\r\n [isRequired]=\"true\"\r\n for=\"evaluationCriteria\"\r\n >\r\n {{ t('EVALUATION_CRITERIA') }}\r\n </label>\r\n <p class=\"action__criteria-subtitle\">{{ t('EACH_EVALUATION_CRITERION_SHOULD_BE') }}</p>\r\n </div>\r\n <ul\r\n cuiDragList\r\n class=\"list\"\r\n >\r\n @for (control of evaluationCriteriaFormArray.controls; track control.controls['id']; let index = $index) {\r\n <li\r\n cuiChecklistBlockListItemEvaluationCriteria\r\n [index]=\"index + 1\"\r\n cuiDragDrop\r\n [disabled]=\"isAddButtonDisabled()\"\r\n (elementDragged)=\"onDrop($event)\"\r\n [criteriaGroup]=\"control\"\r\n [evaluationCriteriaFormArray]=\"evaluationCriteriaFormArray\"\r\n [loadingIds]=\"loadingIds()\"\r\n (saveClicked)=\"onSaveEvaluationCriteria($event)\"\r\n (cancelClicked)=\"onCancelNewEvaluationCriteria()\"\r\n (deleteClicked)=\"openModalDeleteEvaluationCriteria($event)\"\r\n ></li>\r\n } @empty {\r\n <li\r\n cuiEmptyState\r\n [subtitle]=\"t('NO_EVALUATION_CRITERIA_TO_VIEW')\"\r\n ></li>\r\n }\r\n </ul>\r\n <div class=\"action__footer\">\r\n <button\r\n cuiButton\r\n size=\"xxs\"\r\n appearance=\"flat\"\r\n icon=\"cuiIconPlus\"\r\n type=\"button\"\r\n [disabled]=\"isAddButtonDisabled()\"\r\n (click)=\"onAddEvaluationCriteriaItem()\"\r\n >\r\n {{ t('NEW_OPTION') }}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-direction:column;border-radius:inherit}.action{padding:15px;display:flex;flex-direction:column;border-radius:0 0 8px 8px;gap:16px;background:var(--cui-base-10)}.action__criteria-title-container{display:flex;flex-direction:column;gap:4px}.action__criteria-subtitle{font-weight:400;font-size:14px;line-height:20px;color:var(--cui-base-500)}.action__inputs-container{display:flex;flex-direction:column;gap:8px;background:var(--cui-base-0)}.action__input{padding-right:11px;padding-left:11px;display:flex;height:48px;flex-direction:row;justify-content:space-between;border:1px solid var(--cui-base-200);border-radius:8px}.action__criteria{display:flex;flex-direction:row;align-items:center;gap:12px}.action__criteria-index{padding:8px;font-weight:500;font-size:14px;line-height:20px;display:flex;width:44px;flex-direction:row;justify-content:center;align-items:center;border-radius:8px;background-color:var(--cui-base-0)}.action__criteria-input{flex:1;background:var(--cui-base-0)}.list{display:flex;flex-direction:column;gap:8px}\n"] }]
8822
+ }] });
8823
+
8824
+ class CuiChecklistBlockListComponent {
8825
+ constructor() {
8826
+ this.treeStructApiService = inject(CuiTreeStructApiService);
8827
+ this.treeStructNavigatorApiService = inject(CuiTreeStructNavigatorApiService);
8828
+ this.checkListBlockService = inject(CuiCheckListBlockService);
8829
+ this.checkListItems = this.checkListBlockService.checkListItems;
8830
+ this.isDragAvailable = this.checkListBlockService.isDragAvailable;
8831
+ this.checkListItemActionWithVerification = CuiCheckListBlockListItemActionWithVerificationComponent;
8832
+ this.checkListItemActionWithoutVerification = CuiCheckListBlockListItemActionWithoutVerificationComponent;
8833
+ this.checkListItemEvaluation = CuiCheckListBlockListItemEvaluationComponent;
8834
+ this.componentId = this.checkListBlockService.componentId;
8835
+ this.isLoading = signal(false);
8836
+ this.isDragEnabled = computed(() => !this.isLoading() && this.isDragAvailable());
8837
+ this.checkListItemsWithComponents = computed(() => {
8838
+ if (!this.checkListItems()) {
8839
+ return [];
8840
+ }
8841
+ return this.checkListItems().map((element) => ({
8842
+ id: element.id,
8843
+ content: element,
8844
+ component: this.getNodeCheckListItemComponent(element)
8845
+ }));
8846
+ });
8847
+ this.config = input.required();
8848
+ }
8849
+ moveTreeStruct(data, element) {
8850
+ const { targetElement, pointer, index, prevIndex } = data;
8851
+ if (prevIndex === index) {
8852
+ return;
8853
+ }
8854
+ this.isLoading.set(true);
8855
+ this.treeStructNavigatorApiService
8856
+ .moveElement({
8857
+ type: "MOVING_TARGET_ITEM" /* MovingType.TARGET_NODE */,
8858
+ targetItemId: targetElement.dataset['id'],
8859
+ treeStructTargetItemId: targetElement.dataset['parentId'],
8860
+ pointer,
8861
+ movableItemId: element.id,
8862
+ treeStructMovableItemId: this.componentId()
8863
+ })
8864
+ .pipe(switchMap(() => this.treeStructApiService.getById(this.componentId())), finalize(() => this.isLoading.set(false)))
8865
+ .subscribe((treeStruct) => this.checkListBlockService.setCheckListItems(treeStruct.elements));
8866
+ }
8867
+ getNodeCheckListItemComponent(item) {
8868
+ if (item.content.actionsApprove !== null) {
8869
+ return this.checkListItemActionWithVerification;
8870
+ }
8871
+ if ('acceptanceCriteriaEvaluations' in item.content.actionsAssignee[0]) {
8872
+ return this.checkListItemEvaluation;
8873
+ }
8874
+ return this.checkListItemActionWithoutVerification;
8875
+ }
8876
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8877
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiChecklistBlockListComponent, isStandalone: true, selector: "cui-checklist-block-list", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItemsWithComponents() as checkListItemsWithComponents\">\r\n @if (checkListItemsWithComponents?.length) {\r\n <ul\r\n class=\"list__items\"\r\n #list\r\n cuiDragList\r\n >\r\n <ng-container *ngTemplateOutlet=\"items; context: { $implicit: checkListItemsWithComponents }\" />\r\n <ng-template\r\n #items\r\n let-items\r\n let-isHidden=\"isHidden\"\r\n >\r\n @for (item of items; track item.id; let index = $index) {\r\n <li\r\n [attr.data-id]=\"item.content.id\"\r\n [attr.data-parent-id]=\"componentId()\"\r\n [hidden]=\"isHidden\"\r\n cuiHandleScroll\r\n cuiDragDrop\r\n class=\"list__item\"\r\n [class.list__item_disabled]=\"isLoading()\"\r\n (elementDragged)=\"moveTreeStruct($event, item)\"\r\n >\r\n <cui-checklist-block-list-item-container\r\n [checkListBlockItem]=\"item\"\r\n [index]=\"index + 1\"\r\n [config]=\"config()\"\r\n />\r\n </li>\r\n }\r\n </ng-template>\r\n </ul>\r\n } @else {\r\n <cui-empty-state [subtitle]=\"t('NO_CHECKLIST_ITEMS')\" />\r\n }\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host ::ng-deep .codex-editor-overlay{position:unset}.list__items{display:flex;flex-direction:column;border:1px solid var(--cui-base-200);border-radius:8px}.list__item{border-bottom:.5px solid var(--cui-base-200)}.list__item_disabled{pointer-events:none;opacity:.5}.list__item:only-child{border-radius:8px!important}.list__item:first-child{border-radius:8px 8px 0 0}.list__item:last-child{border-radius:0 0 8px 8px;border:none}.cc-drag-drop-placeholder{position:relative;z-index:1;height:40px;border:1px dashed var(--cui-base-200);border-radius:8px;background:var(--cui-base-0)}\n"], dependencies: [{ kind: "component", type: CuiChecklistBlockListItemContainerComponent, selector: "cui-checklist-block-list-item-container", inputs: ["checkListBlockItem", "config", "index"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiContextMenuModule }, { kind: "directive", type: CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiEmptyStateComponent, selector: "cui-empty-state, [cuiEmptyState]", inputs: ["title", "subtitle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: CuiDragDropDirective, selector: "[cuiDragDrop]", inputs: ["disabled"], outputs: ["elementDragged"] }, { kind: "directive", type: CuiHandleScrollDirective, selector: "[cuiHandleScroll]", inputs: ["scrollSpeed"] }, { kind: "directive", type: CuiDragListDirective, selector: "[cuiDragList]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8878
+ }
8879
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockListComponent, decorators: [{
8880
+ type: Component,
8881
+ args: [{ selector: 'cui-checklist-block-list', imports: [
8882
+ CuiChecklistBlockListItemContainerComponent,
8883
+ CuiButtonModule,
8884
+ CuiContextMenuModule,
8885
+ CuiLetDirective,
8886
+ CuiEmptyStateComponent,
8887
+ NgTemplateOutlet,
8888
+ TranslocoDirective,
8889
+ CuiDragDropDirective,
8890
+ CuiHandleScrollDirective,
8891
+ CuiDragListDirective
8892
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *cuiLet=\"checkListItemsWithComponents() as checkListItemsWithComponents\">\r\n @if (checkListItemsWithComponents?.length) {\r\n <ul\r\n class=\"list__items\"\r\n #list\r\n cuiDragList\r\n >\r\n <ng-container *ngTemplateOutlet=\"items; context: { $implicit: checkListItemsWithComponents }\" />\r\n <ng-template\r\n #items\r\n let-items\r\n let-isHidden=\"isHidden\"\r\n >\r\n @for (item of items; track item.id; let index = $index) {\r\n <li\r\n [attr.data-id]=\"item.content.id\"\r\n [attr.data-parent-id]=\"componentId()\"\r\n [hidden]=\"isHidden\"\r\n cuiHandleScroll\r\n cuiDragDrop\r\n class=\"list__item\"\r\n [class.list__item_disabled]=\"isLoading()\"\r\n (elementDragged)=\"moveTreeStruct($event, item)\"\r\n >\r\n <cui-checklist-block-list-item-container\r\n [checkListBlockItem]=\"item\"\r\n [index]=\"index + 1\"\r\n [config]=\"config()\"\r\n />\r\n </li>\r\n }\r\n </ng-template>\r\n </ul>\r\n } @else {\r\n <cui-empty-state [subtitle]=\"t('NO_CHECKLIST_ITEMS')\" />\r\n }\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host ::ng-deep .codex-editor-overlay{position:unset}.list__items{display:flex;flex-direction:column;border:1px solid var(--cui-base-200);border-radius:8px}.list__item{border-bottom:.5px solid var(--cui-base-200)}.list__item_disabled{pointer-events:none;opacity:.5}.list__item:only-child{border-radius:8px!important}.list__item:first-child{border-radius:8px 8px 0 0}.list__item:last-child{border-radius:0 0 8px 8px;border:none}.cc-drag-drop-placeholder{position:relative;z-index:1;height:40px;border:1px dashed var(--cui-base-200);border-radius:8px;background:var(--cui-base-0)}\n"] }]
8893
+ }] });
8894
+
8895
+ class CuiChecklistBlockComponent {
8896
+ constructor() {
8897
+ this.treeStructApiService = inject(CuiTreeStructApiService);
8898
+ this.translocoService = inject(TranslocoService);
8899
+ this.nodeCheckListApiService = inject(CuiNodeChecklistApiService);
8900
+ this.checkListBlockService = inject(CuiCheckListBlockService);
8901
+ this.CHECKLIST_BLOCK_SELECT_OPTIONS = [
8902
+ {
8903
+ label: this.translocoService.translate('ASSIGNEE_APPROVAL'),
8904
+ command: () => this.addCheckListItem("NODE_CHECKLIST_ACTION_WITHOUT_VERIFICATION" /* CuiCheckListBlockItemType.WITHOUT_VERIFICATION */)
8905
+ },
8906
+ {
8907
+ label: this.translocoService.translate('DOUBLE_CHECK_APPROVAL'),
8908
+ command: () => this.addCheckListItem("NODE_CHECKLIST_ACTION_WITH_VERIFICATION" /* CuiCheckListBlockItemType.WITH_VERIFICATION */)
8909
+ },
8910
+ {
8911
+ label: this.translocoService.translate('EVALUATION_OPTIONS'),
8912
+ command: () => this.addCheckListItem("NODE_CHECKLIST_EVALUATION" /* CuiCheckListBlockItemType.EVALUATION */)
8913
+ }
8914
+ ];
8915
+ this.checkListItems = this.checkListBlockService.checkListItems;
8916
+ this.isLoading = signal(false);
8917
+ this.componentId = input.required();
8918
+ this.config = input.required();
8919
+ this.initNodeCheckListBlock();
8920
+ }
8921
+ initNodeCheckListBlock() {
8922
+ effect(() => {
8923
+ this.checkListBlockService.setComponentId(this.componentId());
8924
+ this.treeStructApiService
8925
+ .getById(this.componentId())
8926
+ .subscribe((treeStruct) => this.checkListBlockService.setCheckListItems(treeStruct.elements));
8927
+ }, { allowSignalWrites: true });
8928
+ }
8929
+ addCheckListItem(type) {
8930
+ this.isLoading.set(true);
8931
+ this.nodeCheckListApiService
8932
+ .addNodeCheckListItem({
8933
+ treeStructContainerCheckListId: this.componentId(),
8934
+ title: 'New checklist item',
8935
+ type_operations: type
8936
+ })
8937
+ .pipe(finalize(() => this.isLoading.set(false)))
8938
+ .subscribe((checkListItem) => this.checkListBlockService.addCheckListItem(checkListItem));
8939
+ }
8940
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8941
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CuiChecklistBlockComponent, isStandalone: true, selector: "cui-checklist-block, [cuiCheckListBlock]", inputs: { componentId: { classPropertyName: "componentId", publicName: "componentId", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, providers: [CuiCheckListBlockService], ngImport: i0, template: "<cui-content-wrapper\r\n *transloco=\"let t\"\r\n backgroundColor=\"var(--cui-base-10)\"\r\n [gap]=\"16\"\r\n>\r\n <ng-container *cuiLet=\"checkListItems() as checkListItems\">\r\n <header class=\"header\">\r\n <h2 class=\"heading\">{{ t('CHECKLIST') }}</h2>\r\n\r\n @if (checkListItems) {\r\n <span class=\"item\">{{ checkListItems?.length }} {{ t('ITEM_VARIANT') }}</span>\r\n }\r\n </header>\r\n <cui-content-wrapper>\r\n <cui-checklist-block-list [config]=\"config()\" />\r\n </cui-content-wrapper>\r\n <div>\r\n <button\r\n #actionButton=\"elementRef\"\r\n cuiElement\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"flat\"\r\n size=\"xxs\"\r\n icon=\"cuiIconPlus\"\r\n >\r\n {{ t('ADD_NEW_ITEM') }}\r\n </button>\r\n <cui-context-menu\r\n [items]=\"CHECKLIST_BLOCK_SELECT_OPTIONS\"\r\n [target]=\"actionButton.nativeElement\"\r\n />\r\n </div>\r\n </ng-container>\r\n</cui-content-wrapper>\r\n", styles: [".header{display:flex;gap:12px;align-items:center;justify-content:space-between}.heading{font-weight:500;font-size:16px;line-height:24px}.item{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-500)}\n"], dependencies: [{ kind: "component", type: CuiChecklistBlockListComponent, selector: "cui-checklist-block-list", inputs: ["config"] }, { kind: "component", type: CuiContentWrapperComponent, selector: "cui-content-wrapper, [cuiContentWrapper]", inputs: ["backgroundColor", "gap"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "ngmodule", type: CuiContextMenuModule }, { kind: "component", type: CuiContextMenuComponent, selector: "cui-context-menu[items][target]", inputs: ["items", "target"] }, { kind: "directive", type: CuiElementDirective, selector: "[cuiElement]", exportAs: ["elementRef"] }, { kind: "directive", type: CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8942
+ }
8943
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CuiChecklistBlockComponent, decorators: [{
8944
+ type: Component,
8945
+ args: [{ selector: 'cui-checklist-block, [cuiCheckListBlock]', imports: [
8946
+ CuiChecklistBlockListComponent,
8947
+ CuiContentWrapperComponent,
8948
+ CuiButtonModule,
8949
+ CuiContextMenuModule,
8950
+ CuiElementDirective,
8951
+ CuiLetDirective,
8952
+ TranslocoDirective
8953
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiCheckListBlockService], template: "<cui-content-wrapper\r\n *transloco=\"let t\"\r\n backgroundColor=\"var(--cui-base-10)\"\r\n [gap]=\"16\"\r\n>\r\n <ng-container *cuiLet=\"checkListItems() as checkListItems\">\r\n <header class=\"header\">\r\n <h2 class=\"heading\">{{ t('CHECKLIST') }}</h2>\r\n\r\n @if (checkListItems) {\r\n <span class=\"item\">{{ checkListItems?.length }} {{ t('ITEM_VARIANT') }}</span>\r\n }\r\n </header>\r\n <cui-content-wrapper>\r\n <cui-checklist-block-list [config]=\"config()\" />\r\n </cui-content-wrapper>\r\n <div>\r\n <button\r\n #actionButton=\"elementRef\"\r\n cuiElement\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"flat\"\r\n size=\"xxs\"\r\n icon=\"cuiIconPlus\"\r\n >\r\n {{ t('ADD_NEW_ITEM') }}\r\n </button>\r\n <cui-context-menu\r\n [items]=\"CHECKLIST_BLOCK_SELECT_OPTIONS\"\r\n [target]=\"actionButton.nativeElement\"\r\n />\r\n </div>\r\n </ng-container>\r\n</cui-content-wrapper>\r\n", styles: [".header{display:flex;gap:12px;align-items:center;justify-content:space-between}.heading{font-weight:500;font-size:16px;line-height:24px}.item{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-500)}\n"] }]
8954
+ }], ctorParameters: () => [] });
8955
+
8008
8956
  /**
8009
8957
  * Generated bundle index. Do not edit.
8010
8958
  */
8011
8959
 
8012
- export { AngularOutsideLoaderService, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiGhostInputComponent, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLinkMarker, CuiListTool, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUtilityInfoComponent, CuiVideoTool, CuiVisualViewportService, createDefaultValidators, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor };
8960
+ export { AngularOutsideLoaderService, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLinkMarker, CuiListTool, CuiLoaderComponent, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUtilityInfoComponent, CuiVideoTool, CuiVisualViewportService, cuiCreateDefaultValidators, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor };
8013
8961
  //# sourceMappingURL=cuby-ui-core.mjs.map