@testgorilla/tgo-ui 6.2.13 → 6.2.14-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/components/prompt/prompt.component.d.ts +9 -1
  2. package/components/prompt/prompt.module.d.ts +2 -1
  3. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +7 -7
  4. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
  5. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +7 -7
  6. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
  7. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +7 -7
  8. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
  9. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +7 -7
  10. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
  11. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +7 -7
  12. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  13. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +10 -10
  14. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
  15. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +19 -19
  16. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  17. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +10 -10
  18. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  19. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +7 -7
  20. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +7 -7
  22. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +8 -8
  24. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  25. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +7 -7
  26. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +10 -10
  28. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +3 -3
  30. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +33 -33
  32. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +19 -19
  34. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +24 -24
  36. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +7 -7
  38. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +7 -7
  40. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +7 -7
  42. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  43. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +7 -7
  44. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +7 -7
  46. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +7 -7
  48. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  49. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +10 -10
  50. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  51. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +7 -7
  52. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  53. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +7 -7
  54. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
  55. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +7 -7
  56. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
  57. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +10 -10
  58. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +7 -7
  60. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  61. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +7 -7
  62. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
  63. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +3 -3
  64. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  65. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +3 -3
  66. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  67. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +7 -7
  68. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  69. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +10 -10
  70. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  71. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +7 -7
  72. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  73. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +7 -7
  74. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  75. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +7 -7
  76. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  77. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +7 -7
  78. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  79. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +7 -7
  80. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
  81. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +10 -10
  82. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  83. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +7 -7
  84. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
  85. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +25 -12
  86. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +7 -7
  88. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  89. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +7 -7
  90. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  91. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +10 -10
  92. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  93. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +3 -3
  94. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  95. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +7 -7
  96. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  97. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +7 -7
  98. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  99. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +7 -7
  100. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  101. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +7 -7
  102. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  103. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +7 -7
  104. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  105. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +10 -10
  106. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +3 -3
  108. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
  109. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +7 -7
  110. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
  111. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +10 -10
  112. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  113. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +7 -7
  114. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
  115. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +7 -7
  116. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
  117. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +17 -17
  118. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  119. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +11 -11
  120. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  121. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +10 -10
  122. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  123. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +7 -7
  124. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  125. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +7 -7
  126. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  127. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +10 -10
  128. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
  129. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +17 -17
  130. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
  131. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +7 -7
  132. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  133. package/fesm2022/testgorilla-tgo-ui.mjs +7 -7
  134. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  135. package/package.json +39 -39
@@ -194,8 +194,8 @@ class AiFeedbackComponent {
194
194
  this.feedbackCancelled.emit(this.buildFeedbackData());
195
195
  this.resetPanelState();
196
196
  }
197
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AiFeedbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
198
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AiFeedbackComponent, isStandalone: false, selector: "ui-ai-feedback", inputs: { positiveConfig: { classPropertyName: "positiveConfig", publicName: "positiveConfig", isSignal: true, isRequired: false, transformFunction: null }, negativeConfig: { classPropertyName: "negativeConfig", publicName: "negativeConfig", isSignal: true, isRequired: false, transformFunction: null }, skipPanelForPositive: { classPropertyName: "skipPanelForPositive", publicName: "skipPanelForPositive", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, isRatingDisabled: { classPropertyName: "isRatingDisabled", publicName: "isRatingDisabled", isSignal: true, isRequired: false, transformFunction: null }, enableAutoEmit: { classPropertyName: "enableAutoEmit", publicName: "enableAutoEmit", isSignal: true, isRequired: false, transformFunction: null }, isPositiveFeedback: { classPropertyName: "isPositiveFeedback", publicName: "isPositiveFeedback", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isPositiveFeedback: "isPositiveFeedbackChange", selectionChange: "selectionChange", feedbackSubmitted: "feedbackSubmitted", feedbackCancelled: "feedbackCancelled", feedbackChanged: "feedbackChanged" }, ngImport: i0, template: "<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\n }\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.ai-feedback-wrapper{position:relative}.ai-feedback{display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between;gap:16px;padding-right:4px}@media (max-width: 600px){.ai-feedback{flex-wrap:wrap}}.ai-feedback-buttons-section{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;color:#666}@media (max-width: 600px){.ai-feedback-buttons-section{flex:1 0 100%;justify-content:space-between}}.ai-feedback-buttons{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.ai-feedback-button-positive{margin-right:8px}.ai-feedback-saved{display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.ai-feedback-saved-text{font-size:12px;color:#666}.feedback-panel{display:block;margin-top:16px}.feedback-panel-arrow{position:absolute;top:-8px;width:16px;height:16px;background:inherit;border-left:1px solid;border-top:1px solid;border-color:inherit;transform:rotate(45deg);transition:right .2s ease-out}.feedback-panel.arrow-left .feedback-panel-arrow{right:40px}.feedback-panel.arrow-right .feedback-panel-arrow{right:8px}.feedback-panel-content{position:relative}.feedback-panel-title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.feedback-panel-title{font-size:16px;font-weight:600;color:#242424}.feedback-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.feedback-field{margin-bottom:16px}.feedback-submit-container{display:flex;justify-content:flex-end}@media (max-width: 600px){.feedback-submit-container{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i3.CardComponent, selector: "ui-card", inputs: ["size", "sizeVariant", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus"], outputs: ["cardSelected"] }, { kind: "component", type: i4.TagComponent, selector: "ui-tag", inputs: ["label", "icon", "allowClose", "readOnly", "isSelected", "showIconWhenSelected", "isDisabled", "applicationTheme", "ariaLabel", "ariaRequired"], outputs: ["close", "press"] }, { kind: "component", type: i5.FieldComponent, selector: "ui-field", inputs: ["fullWidth", "fullHeight", "label", "labelHtml", "labelIcon", "fieldName", "placeholder", "id", "value", "badgeVariant", "errors", "disabled", "required", "readOnly", "hintMessage", "type", "updateOnBlur", "allowOnlyDigits", "isAutocompleteOff", "allowNegative", "showBottomContent", "applicationTheme", "ariaLabel", "loading", "isValid", "maxCharacters", "trimOnBlur", "trimOnSubmit", "maxRows", "hasTextAreaCounter", "hideBuiltInErrors", "hideLabelInErrors", "max", "min", "textareaHeight", "borderless", "autosizableTextarea", "isAIVariant", "ariaLabelledby", "ariaDescribedby", "hasError"], outputs: ["validateEvent", "fieldBlur"] }, { kind: "component", type: i6.AiCaveatComponent, selector: "ui-ai-caveat", inputs: ["applicationTheme"] }, { kind: "component", type: i7.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i9.MemoizeFuncPipe, name: "memoizeFunc" }], animations: [
197
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiFeedbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
198
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: AiFeedbackComponent, isStandalone: false, selector: "ui-ai-feedback", inputs: { positiveConfig: { classPropertyName: "positiveConfig", publicName: "positiveConfig", isSignal: true, isRequired: false, transformFunction: null }, negativeConfig: { classPropertyName: "negativeConfig", publicName: "negativeConfig", isSignal: true, isRequired: false, transformFunction: null }, skipPanelForPositive: { classPropertyName: "skipPanelForPositive", publicName: "skipPanelForPositive", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, isRatingDisabled: { classPropertyName: "isRatingDisabled", publicName: "isRatingDisabled", isSignal: true, isRequired: false, transformFunction: null }, enableAutoEmit: { classPropertyName: "enableAutoEmit", publicName: "enableAutoEmit", isSignal: true, isRequired: false, transformFunction: null }, isPositiveFeedback: { classPropertyName: "isPositiveFeedback", publicName: "isPositiveFeedback", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isPositiveFeedback: "isPositiveFeedbackChange", selectionChange: "selectionChange", feedbackSubmitted: "feedbackSubmitted", feedbackCancelled: "feedbackCancelled", feedbackChanged: "feedbackChanged" }, ngImport: i0, template: "<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\n }\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.ai-feedback-wrapper{position:relative}.ai-feedback{display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between;gap:16px;padding-right:4px}@media (max-width: 600px){.ai-feedback{flex-wrap:wrap}}.ai-feedback-buttons-section{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;color:#666}@media (max-width: 600px){.ai-feedback-buttons-section{flex:1 0 100%;justify-content:space-between}}.ai-feedback-buttons{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.ai-feedback-button-positive{margin-right:8px}.ai-feedback-saved{display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.ai-feedback-saved-text{font-size:12px;color:#666}.feedback-panel{display:block;margin-top:16px}.feedback-panel-arrow{position:absolute;top:-8px;width:16px;height:16px;background:inherit;border-left:1px solid;border-top:1px solid;border-color:inherit;transform:rotate(45deg);transition:right .2s ease-out}.feedback-panel.arrow-left .feedback-panel-arrow{right:40px}.feedback-panel.arrow-right .feedback-panel-arrow{right:8px}.feedback-panel-content{position:relative}.feedback-panel-title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.feedback-panel-title{font-size:16px;font-weight:600;color:#242424}.feedback-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.feedback-field{margin-bottom:16px}.feedback-submit-container{display:flex;justify-content:flex-end}@media (max-width: 600px){.feedback-submit-container{display:block}}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i3.CardComponent, selector: "ui-card", inputs: ["size", "sizeVariant", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus"], outputs: ["cardSelected"] }, { kind: "component", type: i4.TagComponent, selector: "ui-tag", inputs: ["label", "icon", "allowClose", "readOnly", "isSelected", "showIconWhenSelected", "isDisabled", "applicationTheme", "ariaLabel", "ariaRequired"], outputs: ["close", "press"] }, { kind: "component", type: i5.FieldComponent, selector: "ui-field", inputs: ["fullWidth", "fullHeight", "label", "labelHtml", "labelIcon", "fieldName", "placeholder", "id", "value", "badgeVariant", "errors", "disabled", "required", "readOnly", "hintMessage", "type", "updateOnBlur", "allowOnlyDigits", "isAutocompleteOff", "allowNegative", "showBottomContent", "applicationTheme", "ariaLabel", "loading", "isValid", "maxCharacters", "trimOnBlur", "trimOnSubmit", "maxRows", "hasTextAreaCounter", "hideBuiltInErrors", "hideLabelInErrors", "max", "min", "textareaHeight", "borderless", "autosizableTextarea", "isAIVariant", "ariaLabelledby", "ariaDescribedby", "hasError"], outputs: ["validateEvent", "fieldBlur"] }, { kind: "component", type: i6.AiCaveatComponent, selector: "ui-ai-caveat", inputs: ["applicationTheme"] }, { kind: "component", type: i7.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i9.MemoizeFuncPipe, name: "memoizeFunc" }], animations: [
199
199
  trigger('slideDown', [
200
200
  transition(':enter', [
201
201
  style({ height: 0, opacity: 0, overflow: 'hidden' }),
@@ -205,7 +205,7 @@ class AiFeedbackComponent {
205
205
  ]),
206
206
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
207
207
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AiFeedbackComponent, decorators: [{
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiFeedbackComponent, decorators: [{
209
209
  type: Component,
210
210
  args: [{ selector: 'ui-ai-feedback', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, animations: [
211
211
  trigger('slideDown', [
@@ -219,8 +219,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
219
219
  }] });
220
220
 
221
221
  class AiFeedbackModule {
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AiFeedbackModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
223
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: AiFeedbackModule, declarations: [AiFeedbackComponent], imports: [CommonModule,
222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiFeedbackModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
223
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: AiFeedbackModule, declarations: [AiFeedbackComponent], imports: [CommonModule,
224
224
  AsyncPipe,
225
225
  ReactiveFormsModule,
226
226
  ButtonComponentModule,
@@ -231,7 +231,7 @@ class AiFeedbackModule {
231
231
  IconComponentModule,
232
232
  UiTranslatePipe,
233
233
  MemoizeFuncPipe], exports: [AiFeedbackComponent] }); }
234
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AiFeedbackModule, imports: [CommonModule,
234
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiFeedbackModule, imports: [CommonModule,
235
235
  ReactiveFormsModule,
236
236
  ButtonComponentModule,
237
237
  CardComponentModule,
@@ -240,7 +240,7 @@ class AiFeedbackModule {
240
240
  AiCaveatComponentModule,
241
241
  IconComponentModule] }); }
242
242
  }
243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AiFeedbackModule, decorators: [{
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiFeedbackModule, decorators: [{
244
244
  type: NgModule,
245
245
  args: [{
246
246
  declarations: [AiFeedbackComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-ai-feedback.mjs","sources":["../../../components/ai-feedback/ai-feedback.model.ts","../../../components/ai-feedback/ai-feedback.component.ts","../../../components/ai-feedback/ai-feedback.component.html","../../../components/ai-feedback/ai-feedback.module.ts","../../../components/ai-feedback/testgorilla-tgo-ui-components-ai-feedback.ts"],"sourcesContent":["export enum AiFeedbackPanelType {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n}\n\nexport type AiFeedbackVariant = 'default' | 'panel' | 'input-only';\n\nexport interface AiFeedbackOption {\n id: string;\n label: string;\n}\n\nexport interface AiFeedbackConfig {\n title: string;\n options?: AiFeedbackOption[]; // \"Other\" option will be automatically appended if options are provided\n otherPlaceholder?: string;\n}\n\nexport interface AiFeedbackData {\n isPositiveFeedback: boolean | null;\n selectedOptions?: string[];\n otherText?: string;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n model,\n OnInit,\n output,\n signal,\n} from '@angular/core';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { FormControl } from '@angular/forms';\nimport { AiFeedbackPanelType, AiFeedbackConfig, AiFeedbackData, AiFeedbackVariant } from './ai-feedback.model';\nimport { ApplicationTheme, IS_MOBILE_TOKEN } from '@testgorilla/tgo-ui/components/core';\nimport { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Subject, debounceTime, distinctUntilChanged } from 'rxjs';\n\n@Component({\n selector: 'ui-ai-feedback',\n templateUrl: './ai-feedback.component.html',\n styleUrl: './ai-feedback.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n animations: [\n trigger('slideDown', [\n transition(':enter', [\n style({ height: 0, opacity: 0, overflow: 'hidden' }),\n animate('200ms ease-out', style({ height: '*', opacity: 1 })),\n ]),\n transition(':leave', [animate('200ms ease-in', style({ height: 0, opacity: 0, overflow: 'hidden' }))]),\n ]),\n ],\n})\nexport class AiFeedbackComponent implements OnInit {\n positiveConfig = input<AiFeedbackConfig>();\n negativeConfig = input<AiFeedbackConfig>();\n skipPanelForPositive = input<boolean>(false);\n applicationTheme = input<ApplicationTheme>('light');\n variant = input<AiFeedbackVariant>('default');\n isRatingDisabled = input<boolean>(false);\n enableAutoEmit = input<boolean>(false);\n isPositiveFeedback = model<boolean | null>(null);\n\n selectionChange = output<boolean | null>();\n feedbackSubmitted = output<AiFeedbackData>();\n feedbackCancelled = output<AiFeedbackData>();\n feedbackChanged = output<AiFeedbackData>();\n\n protected readonly isMobile$ = inject(IS_MOBILE_TOKEN);\n private destroyRef = inject(DestroyRef);\n\n isMobile = toSignal(this.isMobile$, { initialValue: false });\n\n showPanel = signal<boolean>(false);\n panelType = signal<AiFeedbackPanelType | null>(null);\n selectedOptions = signal<string[]>([]);\n otherTextControl = new FormControl<string>('');\n otherTextValue = signal<string>('');\n\n private selectedOptionsSubject = new Subject<string[]>();\n private otherTextSubject = new Subject<string>();\n\n readonly translationContext = 'AI_FEEDBACK.';\n readonly AiFeedbackPanelType = AiFeedbackPanelType;\n private readonly defaultPositiveTitle = `${this.translationContext}POSITIVE_TITLE`;\n private readonly defaultNegativeTitle = `${this.translationContext}NEGATIVE_TITLE`;\n private readonly OTHER_OPTION_ID = 'other';\n\n shouldAutoEmit = computed(() => this.enableAutoEmit() && this.variant() !== 'default');\n\n ngOnInit(): void {\n this.otherTextControl.valueChanges.subscribe(value => {\n this.otherTextValue.set(value || '');\n\n if (this.shouldAutoEmit()) {\n this.otherTextSubject.next(value || '');\n }\n });\n\n this.selectedOptionsSubject\n .pipe(\n debounceTime(500),\n distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => {\n this.feedbackChanged.emit({\n isPositiveFeedback: this.isPositiveFeedback(),\n selectedOptions: this.selectedOptions(),\n otherText: this.otherTextControl.value || undefined,\n });\n });\n\n this.otherTextSubject\n .pipe(debounceTime(500), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.feedbackChanged.emit({\n isPositiveFeedback: this.isPositiveFeedback(),\n selectedOptions: this.selectedOptions(),\n otherText: this.otherTextControl.value || undefined,\n });\n });\n }\n\n getDefaultPanelTitleTranslation(panelType: AiFeedbackPanelType | null): string {\n return panelType === AiFeedbackPanelType.POSITIVE ? this.defaultPositiveTitle : this.defaultNegativeTitle;\n }\n\n activeConfig = computed(() => {\n const type = this.panelType();\n\n if (type === AiFeedbackPanelType.POSITIVE) {\n const config = this.positiveConfig();\n if (this.variant() === 'panel' && config?.options?.length) {\n return this.ensureOtherOption(config);\n }\n return config;\n }\n\n if (type === AiFeedbackPanelType.NEGATIVE) {\n const config = this.negativeConfig();\n if (this.variant() === 'panel' && config?.options?.length) {\n return this.ensureOtherOption(config);\n }\n return config;\n }\n\n return null;\n });\n\n arrowPosition = computed(() => (this.panelType() === AiFeedbackPanelType.POSITIVE ? 'left' : 'right'));\n\n isSubmitDisabled = computed(() => {\n switch (this.variant()) {\n case 'input-only':\n return this.otherTextValue().trim().length === 0;\n case 'panel':\n return this.selectedOptions().length === 0;\n case 'default':\n default:\n return false;\n }\n });\n\n private ensureOtherOption(config: AiFeedbackConfig): AiFeedbackConfig {\n if (this.variant() === 'input-only') {\n return config;\n }\n const hasOther = config.options?.some(opt => opt.id === this.OTHER_OPTION_ID);\n return hasOther\n ? config\n : {\n ...config,\n options: [...(config.options || []), { id: this.OTHER_OPTION_ID, label: 'Other' }],\n };\n }\n\n private buildFeedbackData(): AiFeedbackData {\n if (this.variant() === 'input-only') {\n return {\n isPositiveFeedback: this.isPositiveFeedback(),\n otherText: this.otherTextControl.value || undefined,\n };\n }\n return {\n isPositiveFeedback: this.isPositiveFeedback(),\n selectedOptions: this.selectedOptions(),\n otherText: this.otherTextControl.value || undefined,\n };\n }\n\n private resetPanelState(): void {\n this.showPanel.set(false);\n this.panelType.set(null);\n this.selectedOptions.set([]);\n this.otherTextControl.setValue('');\n }\n\n private shouldShowPanelForVariant(): boolean {\n return this.variant() === 'panel' || this.variant() === 'input-only';\n }\n\n onSelectionChange(isPositive: boolean): void {\n if (this.isRatingDisabled()) {\n return;\n }\n\n const newValue = this.isPositiveFeedback() === isPositive ? null : isPositive;\n this.isPositiveFeedback.set(newValue);\n\n this.selectionChange.emit(newValue);\n\n if (newValue !== null) {\n const shouldSkipPanel = isPositive && this.skipPanelForPositive();\n\n if (this.shouldShowPanelForVariant() && !shouldSkipPanel) {\n this.panelType.set(isPositive ? AiFeedbackPanelType.POSITIVE : AiFeedbackPanelType.NEGATIVE);\n this.showPanel.set(true);\n this.selectedOptions.set([]);\n this.otherTextControl.setValue('');\n }\n } else {\n this.closePanel();\n }\n }\n\n toggleOption(optionId: string): void {\n const current = this.selectedOptions();\n const updated = current.includes(optionId) ? current.filter(id => id !== optionId) : [...current, optionId];\n this.selectedOptions.set(updated);\n\n if (this.shouldAutoEmit()) {\n this.selectedOptionsSubject.next(updated);\n }\n }\n\n isOptionSelected(optionId: string): boolean {\n return this.selectedOptions().includes(optionId);\n }\n\n showOtherField(): boolean {\n return this.variant() === 'input-only' || this.selectedOptions().includes(this.OTHER_OPTION_ID);\n }\n\n onSubmit(): void {\n this.feedbackSubmitted.emit(this.buildFeedbackData());\n this.showPanel.set(false);\n }\n\n closePanel(): void {\n this.feedbackCancelled.emit(this.buildFeedbackData());\n this.resetPanelState();\n }\n}\n","<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule, AsyncPipe } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { AiFeedbackComponent } from './ai-feedback.component';\nimport { UiTranslatePipe, MemoizeFuncPipe } from '@testgorilla/tgo-ui/components/core';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { CardComponentModule } from '@testgorilla/tgo-ui/components/card';\nimport { TagComponentModule } from '@testgorilla/tgo-ui/components/tag';\nimport { FieldComponentModule } from '@testgorilla/tgo-ui/components/field';\nimport { AiCaveatComponentModule } from '@testgorilla/tgo-ui/components/ai-caveat';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@NgModule({\n declarations: [AiFeedbackComponent],\n imports: [\n CommonModule,\n AsyncPipe,\n ReactiveFormsModule,\n ButtonComponentModule,\n CardComponentModule,\n TagComponentModule,\n FieldComponentModule,\n AiCaveatComponentModule,\n IconComponentModule,\n UiTranslatePipe,\n MemoizeFuncPipe,\n ],\n exports: [AiFeedbackComponent],\n})\nexport class AiFeedbackModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,mBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,GAAA,EAAA,CAAA,CAAA;;MCmClB,mBAAmB,CAAA;AAhBhC,IAAA,WA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EhC,YAAY;YACZ,SAAS;YACT,mBAAmB;YACnB,qBAAqB;YACrB,mBAAmB;YACnB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;YACvB,mBAAmB;YACnB,eAAe;AACf,YAAA,eAAe,aAEP,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAdzB,YAAY;YAEZ,mBAAmB;YACnB,qBAAqB;YACrB,mBAAmB;YACnB,kBAAkB;YAClB,oBAAoB;YACpB,uBAAuB;YACvB,mBAAmB,CAAA,EAAA,CAAA,CAAA;;4FAMV,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAjB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,SAAS;wBACT,mBAAmB;wBACnB,qBAAqB;wBACrB,mBAAmB;wBACnB,kBAAkB;wBAClB,oBAAoB;wBACpB,uBAAuB;wBACvB,mBAAmB;wBACnB,eAAe;wBACf,eAAe;AAChB,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-ai-feedback.mjs","sources":["../../../components/ai-feedback/ai-feedback.model.ts","../../../components/ai-feedback/ai-feedback.component.ts","../../../components/ai-feedback/ai-feedback.component.html","../../../components/ai-feedback/ai-feedback.module.ts","../../../components/ai-feedback/testgorilla-tgo-ui-components-ai-feedback.ts"],"sourcesContent":["export enum AiFeedbackPanelType {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n}\n\nexport type AiFeedbackVariant = 'default' | 'panel' | 'input-only';\n\nexport interface AiFeedbackOption {\n id: string;\n label: string;\n}\n\nexport interface AiFeedbackConfig {\n title: string;\n options?: AiFeedbackOption[]; // \"Other\" option will be automatically appended if options are provided\n otherPlaceholder?: string;\n}\n\nexport interface AiFeedbackData {\n isPositiveFeedback: boolean | null;\n selectedOptions?: string[];\n otherText?: string;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n model,\n OnInit,\n output,\n signal,\n} from '@angular/core';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { FormControl } from '@angular/forms';\nimport { AiFeedbackPanelType, AiFeedbackConfig, AiFeedbackData, AiFeedbackVariant } from './ai-feedback.model';\nimport { ApplicationTheme, IS_MOBILE_TOKEN } from '@testgorilla/tgo-ui/components/core';\nimport { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Subject, debounceTime, distinctUntilChanged } from 'rxjs';\n\n@Component({\n selector: 'ui-ai-feedback',\n templateUrl: './ai-feedback.component.html',\n styleUrl: './ai-feedback.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n animations: [\n trigger('slideDown', [\n transition(':enter', [\n style({ height: 0, opacity: 0, overflow: 'hidden' }),\n animate('200ms ease-out', style({ height: '*', opacity: 1 })),\n ]),\n transition(':leave', [animate('200ms ease-in', style({ height: 0, opacity: 0, overflow: 'hidden' }))]),\n ]),\n ],\n})\nexport class AiFeedbackComponent implements OnInit {\n positiveConfig = input<AiFeedbackConfig>();\n negativeConfig = input<AiFeedbackConfig>();\n skipPanelForPositive = input<boolean>(false);\n applicationTheme = input<ApplicationTheme>('light');\n variant = input<AiFeedbackVariant>('default');\n isRatingDisabled = input<boolean>(false);\n enableAutoEmit = input<boolean>(false);\n isPositiveFeedback = model<boolean | null>(null);\n\n selectionChange = output<boolean | null>();\n feedbackSubmitted = output<AiFeedbackData>();\n feedbackCancelled = output<AiFeedbackData>();\n feedbackChanged = output<AiFeedbackData>();\n\n protected readonly isMobile$ = inject(IS_MOBILE_TOKEN);\n private destroyRef = inject(DestroyRef);\n\n isMobile = toSignal(this.isMobile$, { initialValue: false });\n\n showPanel = signal<boolean>(false);\n panelType = signal<AiFeedbackPanelType | null>(null);\n selectedOptions = signal<string[]>([]);\n otherTextControl = new FormControl<string>('');\n otherTextValue = signal<string>('');\n\n private selectedOptionsSubject = new Subject<string[]>();\n private otherTextSubject = new Subject<string>();\n\n readonly translationContext = 'AI_FEEDBACK.';\n readonly AiFeedbackPanelType = AiFeedbackPanelType;\n private readonly defaultPositiveTitle = `${this.translationContext}POSITIVE_TITLE`;\n private readonly defaultNegativeTitle = `${this.translationContext}NEGATIVE_TITLE`;\n private readonly OTHER_OPTION_ID = 'other';\n\n shouldAutoEmit = computed(() => this.enableAutoEmit() && this.variant() !== 'default');\n\n ngOnInit(): void {\n this.otherTextControl.valueChanges.subscribe(value => {\n this.otherTextValue.set(value || '');\n\n if (this.shouldAutoEmit()) {\n this.otherTextSubject.next(value || '');\n }\n });\n\n this.selectedOptionsSubject\n .pipe(\n debounceTime(500),\n distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => {\n this.feedbackChanged.emit({\n isPositiveFeedback: this.isPositiveFeedback(),\n selectedOptions: this.selectedOptions(),\n otherText: this.otherTextControl.value || undefined,\n });\n });\n\n this.otherTextSubject\n .pipe(debounceTime(500), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.feedbackChanged.emit({\n isPositiveFeedback: this.isPositiveFeedback(),\n selectedOptions: this.selectedOptions(),\n otherText: this.otherTextControl.value || undefined,\n });\n });\n }\n\n getDefaultPanelTitleTranslation(panelType: AiFeedbackPanelType | null): string {\n return panelType === AiFeedbackPanelType.POSITIVE ? this.defaultPositiveTitle : this.defaultNegativeTitle;\n }\n\n activeConfig = computed(() => {\n const type = this.panelType();\n\n if (type === AiFeedbackPanelType.POSITIVE) {\n const config = this.positiveConfig();\n if (this.variant() === 'panel' && config?.options?.length) {\n return this.ensureOtherOption(config);\n }\n return config;\n }\n\n if (type === AiFeedbackPanelType.NEGATIVE) {\n const config = this.negativeConfig();\n if (this.variant() === 'panel' && config?.options?.length) {\n return this.ensureOtherOption(config);\n }\n return config;\n }\n\n return null;\n });\n\n arrowPosition = computed(() => (this.panelType() === AiFeedbackPanelType.POSITIVE ? 'left' : 'right'));\n\n isSubmitDisabled = computed(() => {\n switch (this.variant()) {\n case 'input-only':\n return this.otherTextValue().trim().length === 0;\n case 'panel':\n return this.selectedOptions().length === 0;\n case 'default':\n default:\n return false;\n }\n });\n\n private ensureOtherOption(config: AiFeedbackConfig): AiFeedbackConfig {\n if (this.variant() === 'input-only') {\n return config;\n }\n const hasOther = config.options?.some(opt => opt.id === this.OTHER_OPTION_ID);\n return hasOther\n ? config\n : {\n ...config,\n options: [...(config.options || []), { id: this.OTHER_OPTION_ID, label: 'Other' }],\n };\n }\n\n private buildFeedbackData(): AiFeedbackData {\n if (this.variant() === 'input-only') {\n return {\n isPositiveFeedback: this.isPositiveFeedback(),\n otherText: this.otherTextControl.value || undefined,\n };\n }\n return {\n isPositiveFeedback: this.isPositiveFeedback(),\n selectedOptions: this.selectedOptions(),\n otherText: this.otherTextControl.value || undefined,\n };\n }\n\n private resetPanelState(): void {\n this.showPanel.set(false);\n this.panelType.set(null);\n this.selectedOptions.set([]);\n this.otherTextControl.setValue('');\n }\n\n private shouldShowPanelForVariant(): boolean {\n return this.variant() === 'panel' || this.variant() === 'input-only';\n }\n\n onSelectionChange(isPositive: boolean): void {\n if (this.isRatingDisabled()) {\n return;\n }\n\n const newValue = this.isPositiveFeedback() === isPositive ? null : isPositive;\n this.isPositiveFeedback.set(newValue);\n\n this.selectionChange.emit(newValue);\n\n if (newValue !== null) {\n const shouldSkipPanel = isPositive && this.skipPanelForPositive();\n\n if (this.shouldShowPanelForVariant() && !shouldSkipPanel) {\n this.panelType.set(isPositive ? AiFeedbackPanelType.POSITIVE : AiFeedbackPanelType.NEGATIVE);\n this.showPanel.set(true);\n this.selectedOptions.set([]);\n this.otherTextControl.setValue('');\n }\n } else {\n this.closePanel();\n }\n }\n\n toggleOption(optionId: string): void {\n const current = this.selectedOptions();\n const updated = current.includes(optionId) ? current.filter(id => id !== optionId) : [...current, optionId];\n this.selectedOptions.set(updated);\n\n if (this.shouldAutoEmit()) {\n this.selectedOptionsSubject.next(updated);\n }\n }\n\n isOptionSelected(optionId: string): boolean {\n return this.selectedOptions().includes(optionId);\n }\n\n showOtherField(): boolean {\n return this.variant() === 'input-only' || this.selectedOptions().includes(this.OTHER_OPTION_ID);\n }\n\n onSubmit(): void {\n this.feedbackSubmitted.emit(this.buildFeedbackData());\n this.showPanel.set(false);\n }\n\n closePanel(): void {\n this.feedbackCancelled.emit(this.buildFeedbackData());\n this.resetPanelState();\n }\n}\n","<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule, AsyncPipe } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { AiFeedbackComponent } from './ai-feedback.component';\nimport { UiTranslatePipe, MemoizeFuncPipe } from '@testgorilla/tgo-ui/components/core';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { CardComponentModule } from '@testgorilla/tgo-ui/components/card';\nimport { TagComponentModule } from '@testgorilla/tgo-ui/components/tag';\nimport { FieldComponentModule } from '@testgorilla/tgo-ui/components/field';\nimport { AiCaveatComponentModule } from '@testgorilla/tgo-ui/components/ai-caveat';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@NgModule({\n declarations: [AiFeedbackComponent],\n imports: [\n CommonModule,\n AsyncPipe,\n ReactiveFormsModule,\n ButtonComponentModule,\n CardComponentModule,\n TagComponentModule,\n FieldComponentModule,\n AiCaveatComponentModule,\n IconComponentModule,\n UiTranslatePipe,\n MemoizeFuncPipe,\n ],\n exports: [AiFeedbackComponent],\n})\nex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clareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AlertBannerComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
157
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AlertBannerComponent, isStandalone: false, selector: "ui-alert-banner", inputs: { alertType: "alertType", alertVariant: "alertVariant", message: "message", includeDismissButton: "includeDismissButton", shadow: "shadow", linkText: "linkText", linkUrl: "linkUrl", linkTarget: "linkTarget", actions: "actions", applicationTheme: "applicationTheme", isFullWidth: "isFullWidth", closeButtonTooltip: "closeButtonTooltip", hasIcon: "hasIcon", isLoading: "isLoading", fixed: "fixed", ariaDescribedby: "ariaDescribedby", secondaryAlerts: "secondaryAlerts" }, host: { properties: { "class.display-none": "this.isDismissed" } }, usesOnChanges: true, ngImport: i0, template: "<div\n [ngClass]=\"cssClass\"\n [@openClose]\n *ngIf=\"visible\"\n role=\"alert\"\n class=\"alert-container\"\n [attr.theme]=\"applicationTheme\"\n [class.shadow]=\"alertVariant === 'callout' && shadow\"\n [attr.aria-live]=\"alertType === 'error' || alertType === 'warning' ? 'assertive' : 'polite'\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [tabIndex]=\"0\"\n>\n <span style=\"position: absolute; left: -9999px\" id=\"labelledby\">{{\n 'ALERT_BANNER.' + (alertType | uppercase) | uiTranslate | async\n }}</span>\n <span [style.display]=\"'none'\" id=\"describedby\">{{ ariaDescribedby }}</span>\n <div class=\"primary-alert-container\">\n <div class=\"alert-text\">\n @if (hasIcon) {\n <ui-icon class=\"left-icon\" [name]=\"iconName\" size=\"24\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n @if (isLoading) {\n <ui-spinner\n class=\"loading-spinner\"\n size=\"small\"\n [isLoader]=\"false\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-spinner>\n }\n <span [innerHTML]=\"message\"></span>\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\">{{ linkText }}</a>\n </div>\n @if (actions.length > 0) {\n <div class=\"actions-container\">\n @for (action of actions; track $index) {\n <ui-button\n class=\"action-button\"\n [variant]=\"'text-inline'\"\n [label]=\"action.label\"\n size=\"medium\"\n [disabled]=\"!!action.disabled\"\n [applicationTheme]=\"applicationTheme\"\n (buttonClickEvent)=\"action.onClick($event)\"\n ></ui-button>\n }\n </div>\n }\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme === 'classic'\"\n variant=\"text\"\n [justIcon]=\"true\"\n class=\"close\"\n iconName=\"Close\"\n (buttonClickEvent)=\"dismissClick()\"\n ></ui-button>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme !== 'classic' && alertVariant !== 'callout'\"\n class=\"right-icon\"\n [variant]=\"'icon-button'\"\n [applicationTheme]=\"applicationTheme\"\n [iconName]=\"'Close'\"\n [size]=\"'small'\"\n [justIcon]=\"true\"\n [tooltip]=\"(closeButtonTooltip || ('COMMON.CLOSE' | uiTranslate | async))!\"\n (click)=\"dismissClick()\"\n ></ui-button>\n </div>\n @if (secondaryAlerts.length > 0) {\n <div class=\"secondary-alerts-container\">\n <ul>\n @for (alert of secondaryAlerts; track alert) {\n <li class=\"secondary-alert-item\" [innerHTML]=\"alert\"></li>\n }\n </ul>\n </div>\n }\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;width:100%;justify-content:center}:host .snackbar-container{max-width:600px}:host .alert-container,:host .snackbar-container{margin:0 auto;display:flex;padding:0 14px;border-radius:4px;align-items:center;justify-content:space-between;opacity:1;min-height:48px}:host .alert-container.fixed,:host .snackbar-container.fixed{position:fixed}:host .alert-container.static,:host .snackbar-container.static{position:relative}:host .alert-container ui-icon,:host .snackbar-container ui-icon{margin-right:14px}:host .alert-container ui-button,:host .snackbar-container ui-button{margin-left:14px}:host .alert-container ::ng-deep button.mat-mdc-unelevated-button.big,:host .snackbar-container ::ng-deep button.mat-mdc-unelevated-button.big{padding:0;min-width:auto}:host .alert-container .alert-text,:host .alert-container .snackbar-text,:host .snackbar-container .alert-text,:host .snackbar-container .snackbar-text{display:flex;align-items:center;color:#000}:host .alert-container .alert-text a,:host .alert-container .snackbar-text a,:host .snackbar-container .alert-text a,:host .snackbar-container .snackbar-text a{color:#000;text-decoration:underline;font-weight:700}:host .alert-container .alert-text a:hover,:host .alert-container .alert-text a:visited,:host .alert-container .alert-text a:focus,:host .alert-container .snackbar-text a:hover,:host .alert-container .snackbar-text a:visited,:host .alert-container .snackbar-text a:focus,:host .snackbar-container .alert-text a:hover,:host .snackbar-container .alert-text a:visited,:host .snackbar-container .alert-text a:focus,:host .snackbar-container .snackbar-text a:hover,:host .snackbar-container .snackbar-text a:visited,:host .snackbar-container .snackbar-text a:focus{text-decoration:none}:host .alert-container.success,:host .snackbar-container.success{background-color:#cbd6cb}:host .alert-container.info,:host .snackbar-container.info{background-color:#c8d7de}:host .alert-container.warning,:host .snackbar-container.warning{background-color:#f0d6bb}:host .alert-container.error,:host .snackbar-container.error{background-color:#e3c3c6}:host .alert-container[theme=dark].success,:host .alert-container[theme=light].success,:host .snackbar-container[theme=dark].success,:host .snackbar-container[theme=light].success{background-color:#aae47a}:host .alert-container[theme=dark].info,:host .alert-container[theme=light].info,:host .snackbar-container[theme=dark].info,:host .snackbar-container[theme=light].info{background-color:#d9e8ff}:host .alert-container[theme=dark].warning,:host .alert-container[theme=light].warning,:host .snackbar-container[theme=dark].warning,:host .snackbar-container[theme=light].warning{background-color:#ffe1b3}:host .alert-container[theme=dark].error,:host .alert-container[theme=light].error,:host .snackbar-container[theme=dark].error,:host .snackbar-container[theme=light].error{background-color:#ffac9a}::ng-deep .display-none{display:none!important}@media (max-width: 600px){:host .alert-container,:host .snackbar-container{padding:8px 14px}}:host .alert-container{max-width:1312px;flex-direction:column}:host .alert-container.fixed{top:0;z-index:98}:host .alert-container.full-width{width:100%;min-width:100%}:host .alert-container a{margin-left:7px}:host .alert-container[theme=dark] .alert-text,:host .alert-container[theme=light] .alert-text{padding:12px 0}:host .alert-container[theme=dark].banner,:host .alert-container[theme=light].banner{border-radius:0}:host .alert-container[theme=dark].callout,:host .alert-container[theme=light].callout{border-radius:10px}:host .alert-container[theme=dark].shadow,:host .alert-container[theme=light].shadow{box-shadow:0 4px 16px #2424240a}:host .alert-container[theme=dark] .left-icon,:host .alert-container[theme=light] .left-icon{margin-right:8px}:host .alert-container[theme=dark] .right-icon,:host .alert-container[theme=light] .right-icon{cursor:pointer;margin-left:0;margin-right:2px}:host .alert-container .loading-spinner{margin-right:8px;display:inline-flex;vertical-align:middle}:host .alert-container .primary-alert-container{display:flex;justify-content:space-between;align-items:center;width:100%;gap:8px}:host .alert-container .actions-container{display:flex;align-items:center;gap:8px;white-space:nowrap}:host .alert-container .actions-container ui-button{margin-left:0}:host .alert-container .secondary-alerts-container{padding-left:8px;padding-bottom:16px;display:flex;width:100%;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i3.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i4.SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i5.UiTranslatePipe, name: "uiTranslate" }], animations: [
156
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AlertBannerComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
157
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: AlertBannerComponent, isStandalone: false, selector: "ui-alert-banner", inputs: { alertType: "alertType", alertVariant: "alertVariant", message: "message", includeDismissButton: "includeDismissButton", shadow: "shadow", linkText: "linkText", linkUrl: "linkUrl", linkTarget: "linkTarget", actions: "actions", applicationTheme: "applicationTheme", isFullWidth: "isFullWidth", closeButtonTooltip: "closeButtonTooltip", hasIcon: "hasIcon", isLoading: "isLoading", fixed: "fixed", ariaDescribedby: "ariaDescribedby", secondaryAlerts: "secondaryAlerts" }, host: { properties: { "class.display-none": "this.isDismissed" } }, usesOnChanges: true, ngImport: i0, template: "<div\n [ngClass]=\"cssClass\"\n [@openClose]\n *ngIf=\"visible\"\n role=\"alert\"\n class=\"alert-container\"\n [attr.theme]=\"applicationTheme\"\n [class.shadow]=\"alertVariant === 'callout' && shadow\"\n [attr.aria-live]=\"alertType === 'error' || alertType === 'warning' ? 'assertive' : 'polite'\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [tabIndex]=\"0\"\n>\n <span style=\"position: absolute; left: -9999px\" id=\"labelledby\">{{\n 'ALERT_BANNER.' + (alertType | uppercase) | uiTranslate | async\n }}</span>\n <span [style.display]=\"'none'\" id=\"describedby\">{{ ariaDescribedby }}</span>\n <div class=\"primary-alert-container\">\n <div class=\"alert-text\">\n @if (hasIcon) {\n <ui-icon class=\"left-icon\" [name]=\"iconName\" size=\"24\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n @if (isLoading) {\n <ui-spinner\n class=\"loading-spinner\"\n size=\"small\"\n [isLoader]=\"false\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-spinner>\n }\n <span [innerHTML]=\"message\"></span>\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\">{{ linkText }}</a>\n </div>\n @if (actions.length > 0) {\n <div class=\"actions-container\">\n @for (action of actions; track $index) {\n <ui-button\n class=\"action-button\"\n [variant]=\"'text-inline'\"\n [label]=\"action.label\"\n size=\"medium\"\n [disabled]=\"!!action.disabled\"\n [applicationTheme]=\"applicationTheme\"\n (buttonClickEvent)=\"action.onClick($event)\"\n ></ui-button>\n }\n </div>\n }\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme === 'classic'\"\n variant=\"text\"\n [justIcon]=\"true\"\n class=\"close\"\n iconName=\"Close\"\n (buttonClickEvent)=\"dismissClick()\"\n ></ui-button>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme !== 'classic' && alertVariant !== 'callout'\"\n class=\"right-icon\"\n [variant]=\"'icon-button'\"\n [applicationTheme]=\"applicationTheme\"\n [iconName]=\"'Close'\"\n [size]=\"'small'\"\n [justIcon]=\"true\"\n [tooltip]=\"(closeButtonTooltip || ('COMMON.CLOSE' | uiTranslate | async))!\"\n (click)=\"dismissClick()\"\n ></ui-button>\n </div>\n @if (secondaryAlerts.length > 0) {\n <div class=\"secondary-alerts-container\">\n <ul>\n @for (alert of secondaryAlerts; track alert) {\n <li class=\"secondary-alert-item\" [innerHTML]=\"alert\"></li>\n }\n </ul>\n </div>\n }\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;width:100%;justify-content:center}:host .snackbar-container{max-width:600px}:host .alert-container,:host .snackbar-container{margin:0 auto;display:flex;padding:0 14px;border-radius:4px;align-items:center;justify-content:space-between;opacity:1;min-height:48px}:host .alert-container.fixed,:host .snackbar-container.fixed{position:fixed}:host .alert-container.static,:host .snackbar-container.static{position:relative}:host .alert-container ui-icon,:host .snackbar-container ui-icon{margin-right:14px}:host .alert-container ui-button,:host .snackbar-container ui-button{margin-left:14px}:host .alert-container ::ng-deep button.mat-mdc-unelevated-button.big,:host .snackbar-container ::ng-deep button.mat-mdc-unelevated-button.big{padding:0;min-width:auto}:host .alert-container .alert-text,:host .alert-container .snackbar-text,:host .snackbar-container .alert-text,:host .snackbar-container .snackbar-text{display:flex;align-items:center;color:#000}:host .alert-container .alert-text a,:host .alert-container .snackbar-text a,:host .snackbar-container .alert-text a,:host .snackbar-container .snackbar-text a{color:#000;text-decoration:underline;font-weight:700}:host .alert-container .alert-text a:hover,:host .alert-container .alert-text a:visited,:host .alert-container .alert-text a:focus,:host .alert-container .snackbar-text a:hover,:host .alert-container .snackbar-text a:visited,:host .alert-container .snackbar-text a:focus,:host .snackbar-container .alert-text a:hover,:host .snackbar-container .alert-text a:visited,:host .snackbar-container .alert-text a:focus,:host .snackbar-container .snackbar-text a:hover,:host .snackbar-container .snackbar-text a:visited,:host .snackbar-container .snackbar-text a:focus{text-decoration:none}:host .alert-container.success,:host .snackbar-container.success{background-color:#cbd6cb}:host .alert-container.info,:host .snackbar-container.info{background-color:#c8d7de}:host .alert-container.warning,:host .snackbar-container.warning{background-color:#f0d6bb}:host .alert-container.error,:host .snackbar-container.error{background-color:#e3c3c6}:host .alert-container[theme=dark].success,:host .alert-container[theme=light].success,:host .snackbar-container[theme=dark].success,:host .snackbar-container[theme=light].success{background-color:#aae47a}:host .alert-container[theme=dark].info,:host .alert-container[theme=light].info,:host .snackbar-container[theme=dark].info,:host .snackbar-container[theme=light].info{background-color:#d9e8ff}:host .alert-container[theme=dark].warning,:host .alert-container[theme=light].warning,:host .snackbar-container[theme=dark].warning,:host .snackbar-container[theme=light].warning{background-color:#ffe1b3}:host .alert-container[theme=dark].error,:host .alert-container[theme=light].error,:host .snackbar-container[theme=dark].error,:host .snackbar-container[theme=light].error{background-color:#ffac9a}::ng-deep .display-none{display:none!important}@media (max-width: 600px){:host .alert-container,:host .snackbar-container{padding:8px 14px}}:host .alert-container{max-width:1312px;flex-direction:column}:host .alert-container.fixed{top:0;z-index:98}:host .alert-container.full-width{width:100%;min-width:100%}:host .alert-container a{margin-left:7px}:host .alert-container[theme=dark] .alert-text,:host .alert-container[theme=light] .alert-text{padding:12px 0}:host .alert-container[theme=dark].banner,:host .alert-container[theme=light].banner{border-radius:0}:host .alert-container[theme=dark].callout,:host .alert-container[theme=light].callout{border-radius:10px}:host .alert-container[theme=dark].shadow,:host .alert-container[theme=light].shadow{box-shadow:0 4px 16px #2424240a}:host .alert-container[theme=dark] .left-icon,:host .alert-container[theme=light] .left-icon{margin-right:8px}:host .alert-container[theme=dark] .right-icon,:host .alert-container[theme=light] .right-icon{cursor:pointer;margin-left:0;margin-right:2px}:host .alert-container .loading-spinner{margin-right:8px;display:inline-flex;vertical-align:middle}:host .alert-container .primary-alert-container{display:flex;justify-content:space-between;align-items:center;width:100%;gap:8px}:host .alert-container .actions-container{display:flex;align-items:center;gap:8px;white-space:nowrap}:host .alert-container .actions-container ui-button{margin-left:0}:host .alert-container .secondary-alerts-container{padding-left:8px;padding-bottom:16px;display:flex;width:100%;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i3.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i4.SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i5.UiTranslatePipe, name: "uiTranslate" }], animations: [
158
158
  trigger('openClose', [
159
159
  transition(':enter', [animate('0.2s ease-out', style({ opacity: 1 }))]),
160
160
  transition(':leave', [animate('0.2s ease-in', style({ opacity: 0 }))]),
161
161
  ]),
162
162
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
163
163
  }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AlertBannerComponent, decorators: [{
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AlertBannerComponent, decorators: [{
165
165
  type: Component,
166
166
  args: [{ selector: 'ui-alert-banner', animations: [
167
167
  trigger('openClose', [
@@ -214,11 +214,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
214
214
  }] } });
215
215
 
216
216
  class AlertBannerComponentModule {
217
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AlertBannerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
218
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: AlertBannerComponentModule, declarations: [AlertBannerComponent], imports: [CommonModule, ButtonComponentModule, IconComponentModule, SpinnerComponentModule, UiTranslatePipe], exports: [AlertBannerComponent] }); }
219
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AlertBannerComponentModule, imports: [CommonModule, ButtonComponentModule, IconComponentModule, SpinnerComponentModule] }); }
217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AlertBannerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
218
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: AlertBannerComponentModule, declarations: [AlertBannerComponent], imports: [CommonModule, ButtonComponentModule, IconComponentModule, SpinnerComponentModule, UiTranslatePipe], exports: [AlertBannerComponent] }); }
219
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AlertBannerComponentModule, imports: [CommonModule, ButtonComponentModule, IconComponentModule, SpinnerComponentModule] }); }
220
220
  }
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AlertBannerComponentModule, decorators: [{
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AlertBannerComponentModule, decorators: [{
222
222
  type: NgModule,
223
223
  args: [{
224
224
  declarations: [AlertBannerComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-alert-banner.mjs","sources":["../../../components/alert-banner/alert-banner.component.ts","../../../components/alert-banner/alert-banner.component.html","../../../components/alert-banner/alert-banner.component.module.ts","../../../components/alert-banner/testgorilla-tgo-ui-components-alert-banner.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges,\n} from '@angular/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { AlertBarType, AlertVariant, alertBarsUtil } from '@testgorilla/tgo-ui/components/core';\nimport { AlertBannerAction, LinkTargetType } from './alert-banner.model';\n\n@Component({\n selector: 'ui-alert-banner',\n templateUrl: './alert-banner.component.html',\n styleUrls: ['./alert-banner.component.scss'],\n animations: [\n trigger('openClose', [\n transition(':enter', [animate('0.2s ease-out', style({ opacity: 1 }))]),\n transition(':leave', [animate('0.2s ease-in', style({ opacity: 0 }))]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class AlertBannerComponent implements OnInit, OnChanges {\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n /**\n * Alert Banner type\n *\n * @type {AlertBarType}\n * @default 'success'\n * @memberof AlertBannerComponent\n */\n @Input() alertType: AlertBarType = 'success';\n\n /**\n * Alert Banner variant\n *\n * @type {AlertVariant}\n * @default 'banner'\n * @memberof AlertBannerComponent\n */\n @Input() alertVariant: AlertVariant = 'banner';\n\n /**\n * Alert banner message\n *\n * @memberof AlertBannerComponent\n */\n @Input() message = '';\n\n /**\n * Include dismmiss button\n *\n * @default true\n * @memberof AlertBannerComponent\n */\n @Input() includeDismissButton = true;\n\n /**\n * Include shadow or not\n *\n * @default false\n * @memberof AlertBannerComponent\n */\n @Input() shadow = false;\n\n /**\n * Link text that will appended at the end of message\n *\n * @default ''\n * @memberof AlertBannerComponent\n */\n @Input() linkText? = '';\n\n /**\n * Link url\n *\n * @memberof AlertBannerComponent\n */\n @Input() linkUrl?: string;\n\n /**\n * Link target\n *\n * @type {@type {LinkTargetType}}\n * @default '_blank'\n * @memberof AlertBannerComponent\n */\n @Input() linkTarget?: LinkTargetType = '_blank';\n\n /**\n * Optional action buttons displayed on the right side of the banner.\n *\n * @type {AlertBannerAction[]}\n * @default []\n * @memberof AlertBannerComponent\n */\n @Input() actions: AlertBannerAction[] = [];\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @default 'light'\n * @memberof AlertBannerComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Sets the full width\n *\n * @type {boolean}\n * @memberof AlertBannerComponent\n */\n @Input() isFullWidth: boolean | undefined;\n\n /**\n * Close button tooltip\n *\n * @type {string}\n * @default ''\n * @memberof AlertBannerComponent\n */\n @Input() closeButtonTooltip = '';\n\n /**\n * Shows icon\n *\n * @type {boolean}\n * @default true\n * @memberof AlertBannerComponent\n */\n @Input() hasIcon = true;\n\n /**\n * Controls loading state for spinner visibility.\n *\n * @type {boolean}\n * @default false\n * @memberof AlertBannerComponent\n */\n @Input() isLoading = false;\n\n /**\n * Sets the alert banner position\n *\n * @type {boolean}\n * @default false\n * @memberof AlertBannerComponent\n */\n @Input() fixed = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof AlertBannerComponent\n */\n @Input() ariaDescribedby = '';\n\n @Input() secondaryAlerts: string[] = [];\n\n @HostBinding('class.display-none') get isDismissed() {\n return this.dismissAlertBanner;\n }\n\n iconName: IconName;\n visible = true;\n fullWidth: boolean;\n position: string;\n cssClass: string;\n dismissAlertBanner = false;\n\n ngOnInit(): void {\n this.updateBanner();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['alertType']) {\n this.updateBanner();\n }\n }\n\n private updateBanner(): void {\n this.iconName = alertBarsUtil.setIcon(this.alertType) as IconName;\n this.position = alertBarsUtil.setPosition(this.fixed);\n this.fullWidth = this.isFullWidth ?? this.alertVariant === 'banner';\n this.cssClass = alertBarsUtil.setCssClass(this.fullWidth, this.alertType, this.position, this.alertVariant);\n }\n\n //Hide snackbar when dismiss button is clicked\n dismissClick() {\n this.visible = false;\n setTimeout(() => {\n this.dismissAlertBanner = true;\n }, 200);\n }\n}\n","<div\n [ngClass]=\"cssClass\"\n [@openClose]\n *ngIf=\"visible\"\n role=\"alert\"\n class=\"alert-container\"\n [attr.theme]=\"applicationTheme\"\n [class.shadow]=\"alertVariant === 'callout' && shadow\"\n [attr.aria-live]=\"alertType === 'error' || alertType === 'warning' ? 'assertive' : 'polite'\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [tabIndex]=\"0\"\n>\n <span style=\"position: absolute; left: -9999px\" id=\"labelledby\">{{\n 'ALERT_BANNER.' + (alertType | uppercase) | uiTranslate | async\n }}</span>\n <span [style.display]=\"'none'\" id=\"describedby\">{{ ariaDescribedby }}</span>\n <div class=\"primary-alert-container\">\n <div class=\"alert-text\">\n @if (hasIcon) {\n <ui-icon class=\"left-icon\" [name]=\"iconName\" size=\"24\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n @if (isLoading) {\n <ui-spinner\n class=\"loading-spinner\"\n size=\"small\"\n [isLoader]=\"false\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-spinner>\n }\n <span [innerHTML]=\"message\"></span>\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\">{{ linkText }}</a>\n </div>\n @if (actions.length > 0) {\n <div class=\"actions-container\">\n @for (action of actions; track $index) {\n <ui-button\n class=\"action-button\"\n [variant]=\"'text-inline'\"\n [label]=\"action.label\"\n size=\"medium\"\n [disabled]=\"!!action.disabled\"\n [applicationTheme]=\"applicationTheme\"\n (buttonClickEvent)=\"action.onClick($event)\"\n ></ui-button>\n }\n </div>\n }\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme === 'classic'\"\n variant=\"text\"\n [justIcon]=\"true\"\n class=\"close\"\n iconName=\"Close\"\n (buttonClickEvent)=\"dismissClick()\"\n ></ui-button>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme !== 'classic' && alertVariant !== 'callout'\"\n class=\"right-icon\"\n [variant]=\"'icon-button'\"\n [applicationTheme]=\"applicationTheme\"\n [iconName]=\"'Close'\"\n [size]=\"'small'\"\n [justIcon]=\"true\"\n [tooltip]=\"(closeButtonTooltip || ('COMMON.CLOSE' | uiTranslate | async))!\"\n (click)=\"dismissClick()\"\n ></ui-button>\n </div>\n @if (secondaryAlerts.length > 0) {\n <div class=\"secondary-alerts-container\">\n <ul>\n @for (alert of secondaryAlerts; track alert) {\n <li class=\"secondary-alert-item\" [innerHTML]=\"alert\"></li>\n }\n </ul>\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\nimport { AlertBannerComponent } from './alert-banner.component';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [AlertBannerComponent],\n imports: [CommonModule, ButtonComponentModule, IconComponentModule, SpinnerComponentModule, UiTranslatePipe],\n exports: [AlertBannerComponent],\n})\nexport class AlertBannerComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA8Ba,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAA,CAAA,eAAe,GAAf,eAAe;AAO5F;;;;;;AAMG;QACM,IAAA,CAAA,SAAS,GAAiB,SAAS;AAE5C;;;;;;AAMG;QACM,IAAA,CAAA,YAAY,GAAiB,QAAQ;AAE9C;;;;AAIG;QACM,IAAA,CAAA,OAAO,GAAG,EAAE;AAErB;;;;;AAKG;QACM,IAAA,CAAA,oBAAoB,GAAG,IAAI;AAEpC;;;;;AAKG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK;AAEvB;;;;;AAKG;QACM,IAAA,CAAA,QAAQ,GAAI,EAAE;AASvB;;;;;;AAMG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GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,YAH3B,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;;4FAG/E,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,CAAC;oBAC5G,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-alert-banner.mjs","sources":["../../../components/alert-banner/alert-banner.component.ts","../../../components/alert-banner/alert-banner.component.html","../../../components/alert-banner/alert-banner.component.module.ts","../../../components/alert-banner/testgorilla-tgo-ui-components-alert-banner.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges,\n} from '@angular/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { AlertBarType, AlertVariant, alertBarsUtil } from '@testgorilla/tgo-ui/components/core';\nimport { AlertBannerAction, LinkTargetType } from './alert-banner.model';\n\n@Component({\n selector: 'ui-alert-banner',\n templateUrl: './alert-banner.component.html',\n styleUrls: ['./alert-banner.component.scss'],\n animations: [\n trigger('openClose', [\n transition(':enter', [animate('0.2s ease-out', style({ opacity: 1 }))]),\n transition(':leave', [animate('0.2s ease-in', style({ opacity: 0 }))]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class AlertBannerComponent implements OnInit, OnChanges {\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n /**\n * Alert Banner type\n *\n * @type {AlertBarType}\n * @default 'success'\n * @memberof AlertBannerComponent\n */\n @Input() alertType: AlertBarType = 'success';\n\n /**\n * Alert Banner variant\n *\n * @type {AlertVariant}\n * @default 'banner'\n * @memberof AlertBannerComponent\n */\n @Input() alertVariant: AlertVariant = 'banner';\n\n /**\n * Alert banner message\n *\n * @memberof AlertBannerComponent\n */\n @Input() message = '';\n\n /**\n * Include dismmiss button\n *\n * @default true\n * @memberof AlertBannerComponent\n */\n @Input() includeDismissButton = true;\n\n /**\n * Include shadow or not\n *\n * @default false\n * @memberof AlertBannerComponent\n */\n @Input() shadow = false;\n\n /**\n * Link text that will appended at the end of message\n *\n * @default ''\n * @memberof AlertBannerComponent\n */\n @Input() linkText? = '';\n\n /**\n * Link url\n *\n * @memberof AlertBannerComponent\n */\n @Input() linkUrl?: string;\n\n /**\n * Link target\n *\n * @type {@type {LinkTargetType}}\n * @default '_blank'\n * @memberof AlertBannerComponent\n */\n @Input() linkTarget?: LinkTargetType = '_blank';\n\n /**\n * Optional action buttons displayed on the right side of the banner.\n *\n * @type {AlertBannerAction[]}\n * @default []\n * @memberof AlertBannerComponent\n */\n @Input() actions: AlertBannerAction[] = [];\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @default 'light'\n * @memberof AlertBannerComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Sets the full width\n *\n * @type {boolean}\n * @memberof AlertBannerComponent\n */\n @Input() isFullWidth: boolean | undefined;\n\n /**\n * Close button tooltip\n *\n * @type {string}\n * @default ''\n * @memberof AlertBannerComponent\n */\n @Input() closeButtonTooltip = '';\n\n /**\n * Shows icon\n *\n * @type {boolean}\n * @default true\n * @memberof AlertBannerComponent\n */\n @Input() hasIcon = true;\n\n /**\n * Controls loading state for spinner visibility.\n *\n * @type {boolean}\n * @default false\n * @memberof AlertBannerComponent\n */\n @Input() isLoading = false;\n\n /**\n * Sets the alert banner position\n *\n * @type {boolean}\n * @default false\n * @memberof AlertBannerComponent\n */\n @Input() fixed = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof AlertBannerComponent\n */\n @Input() ariaDescribedby = '';\n\n @Input() secondaryAlerts: string[] = [];\n\n @HostBinding('class.display-none') get isDismissed() {\n return this.dismissAlertBanner;\n }\n\n iconName: IconName;\n visible = true;\n fullWidth: boolean;\n position: string;\n cssClass: string;\n dismissAlertBanner = false;\n\n ngOnInit(): void {\n this.updateBanner();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['alertType']) {\n this.updateBanner();\n }\n }\n\n private updateBanner(): void {\n this.iconName = alertBarsUtil.setIcon(this.alertType) as IconName;\n this.position = alertBarsUtil.setPosition(this.fixed);\n this.fullWidth = this.isFullWidth ?? this.alertVariant === 'banner';\n this.cssClass = alertBarsUtil.setCssClass(this.fullWidth, this.alertType, this.position, this.alertVariant);\n }\n\n //Hide snackbar when dismiss button is clicked\n dismissClick() {\n this.visible = false;\n setTimeout(() => {\n this.dismissAlertBanner = true;\n }, 200);\n }\n}\n","<div\n [ngClass]=\"cssClass\"\n [@openClose]\n *ngIf=\"visible\"\n role=\"alert\"\n class=\"alert-container\"\n [attr.theme]=\"applicationTheme\"\n [class.shadow]=\"alertVariant === 'callout' && shadow\"\n [attr.aria-live]=\"alertType === 'error' || alertType === 'warning' ? 'assertive' : 'polite'\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [tabIndex]=\"0\"\n>\n <span style=\"position: absolute; left: -9999px\" id=\"labelledby\">{{\n 'ALERT_BANNER.' + (alertType | uppercase) | uiTranslate | async\n }}</span>\n <span [style.display]=\"'none'\" id=\"describedby\">{{ ariaDescribedby }}</span>\n <div class=\"primary-alert-container\">\n <div class=\"alert-text\">\n @if (hasIcon) {\n <ui-icon class=\"left-icon\" [name]=\"iconName\" size=\"24\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n @if (isLoading) {\n <ui-spinner\n class=\"loading-spinner\"\n size=\"small\"\n [isLoader]=\"false\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-spinner>\n }\n <span [innerHTML]=\"message\"></span>\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\">{{ linkText }}</a>\n </div>\n @if (actions.length > 0) {\n <div class=\"actions-container\">\n @for (action of actions; track $index) {\n <ui-button\n class=\"action-button\"\n [variant]=\"'text-inline'\"\n [label]=\"action.label\"\n size=\"medium\"\n [disabled]=\"!!action.disabled\"\n [applicationTheme]=\"applicationTheme\"\n (buttonClickEvent)=\"action.onClick($event)\"\n ></ui-button>\n }\n </div>\n }\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme === 'classic'\"\n variant=\"text\"\n [justIcon]=\"true\"\n class=\"close\"\n iconName=\"Close\"\n (buttonClickEvent)=\"dismissClick()\"\n ></ui-button>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme !== 'classic' && alertVariant !== 'callout'\"\n class=\"right-icon\"\n [variant]=\"'icon-button'\"\n [applicationTheme]=\"applicationTheme\"\n [iconName]=\"'Close'\"\n [size]=\"'small'\"\n [justIcon]=\"true\"\n [tooltip]=\"(closeButtonTooltip || ('COMMON.CLOSE' | uiTranslate | async))!\"\n (click)=\"dismissClick()\"\n ></ui-button>\n </div>\n @if (secondaryAlerts.length > 0) {\n <div class=\"secondary-alerts-container\">\n <ul>\n @for (alert of secondaryAlerts; track alert) {\n <li class=\"secondary-alert-item\" [innerHTML]=\"alert\"></li>\n }\n </ul>\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\nimport { AlertBannerComponent } from './alert-banner.component';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [AlertBannerComponent],\n imports: [CommonModule, ButtonComponentModule, IconComponentModule, SpinnerComponentModule, UiTranslatePipe],\n exports: [AlertBannerComponent],\n})\nexport class AlertBannerComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA8Ba,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAe,CAAA,eAAA,GAAf,eAAe;AAO5F;;;;;;AAMG;QACM,IAAS,CAAA,SAAA,GAAiB,SAAS;AAE5C;;;;;;AAMG;QACM,IAAY,CAAA,YAAA,GAAiB,QAAQ;AAE9C;;;;AAIG;QACM,IAAO,CAAA,OAAA,GAAG,EAAE;AAErB;;;;;AAKG;QACM,IAAoB,CAAA,oBAAA,GAAG,IAAI;AAEpC;;;;;AAKG;QACM,IAAM,CAAA,MAAA,GAAG,KAAK;AAEvB;;;;;AAKG;QACM,IAAQ,CAAA,QAAA,GAAI,EAAE;AASvB;;;;;;AAMG;QACM,IAAU,CAAA,UAAA,GAAoB,QAAQ;AAE/C;;;;;;AAMG;QACM,IAAO,CAAA,OAAA,GAAwB,EAAE;AAE1C;;;;;;;AAOG;QACM,IAAgB,CAAA,gBAAA,GAAqB,OAAO;AAUrD;;;;;;AAMG;QACM,IAAkB,CAAA,kBAAA,GAAG,EAAE;AAEhC;;;;;;AAMG;QACM,IAAO,CAAA,OAAA,GAAG,IAAI;AAEvB;;;;;;AAMG;QACM,IAAS,CAAA,SAAA,GAAG,KAAK;AAE1B;;;;;;AAMG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK;AAEtB;;;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AAe,CAAC;oBAC5G,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -93,10 +93,10 @@ class AudioWaveformService {
93
93
  return amplitude * weight;
94
94
  });
95
95
  }
96
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
97
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformService, providedIn: 'root' }); }
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
97
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformService, providedIn: 'root' }); }
98
98
  }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformService, decorators: [{
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformService, decorators: [{
100
100
  type: Injectable,
101
101
  args: [{ providedIn: 'root' }]
102
102
  }] });
@@ -164,20 +164,20 @@ class AudioWaveformComponent {
164
164
  this.waveformService.stop();
165
165
  }
166
166
  }
167
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
168
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AudioWaveformComponent, isStandalone: true, selector: "ui-audio-waveform", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, minScale: { classPropertyName: "minScale", publicName: "minScale", isSignal: true, isRequired: false, transformFunction: null }, smoothing: { classPropertyName: "smoothing", publicName: "smoothing", isSignal: true, isRequired: false, transformFunction: null }, bars: { classPropertyName: "bars", publicName: "bars", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"waveform\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.gap.px]=\"gap()\"\n role=\"img\"\n [attr.aria-label]=\"effectiveActive() ? 'Audio waveform active' : 'Audio waveform inactive'\"\n>\n @for (item of effectiveBars(); track $index) {\n <div\n class=\"waveform-bar\"\n [style.width.px]=\"barWidth()\"\n [style.height.px]=\"barHeight(barValue($index))\"\n [style.border-radius.px]=\"barRadius()\"\n [style.background-color]=\"barColor($index)\"\n ></div>\n }\n</div>\n", styles: [".waveform{display:inline-flex;align-items:center}.waveform-bar{flex-shrink:0;transition:height 80ms ease-out}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
168
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: AudioWaveformComponent, isStandalone: true, selector: "ui-audio-waveform", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, minScale: { classPropertyName: "minScale", publicName: "minScale", isSignal: true, isRequired: false, transformFunction: null }, smoothing: { classPropertyName: "smoothing", publicName: "smoothing", isSignal: true, isRequired: false, transformFunction: null }, bars: { classPropertyName: "bars", publicName: "bars", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"waveform\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.gap.px]=\"gap()\"\n role=\"img\"\n [attr.aria-label]=\"effectiveActive() ? 'Audio waveform active' : 'Audio waveform inactive'\"\n>\n @for (item of effectiveBars(); track $index) {\n <div\n class=\"waveform-bar\"\n [style.width.px]=\"barWidth()\"\n [style.height.px]=\"barHeight(barValue($index))\"\n [style.border-radius.px]=\"barRadius()\"\n [style.background-color]=\"barColor($index)\"\n ></div>\n }\n</div>\n", styles: [".waveform{display:inline-flex;align-items:center}.waveform-bar{flex-shrink:0;transition:height 80ms ease-out}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
169
169
  }
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformComponent, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformComponent, decorators: [{
171
171
  type: Component,
172
172
  args: [{ selector: 'ui-audio-waveform', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "<div\n class=\"waveform\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.gap.px]=\"gap()\"\n role=\"img\"\n [attr.aria-label]=\"effectiveActive() ? 'Audio waveform active' : 'Audio waveform inactive'\"\n>\n @for (item of effectiveBars(); track $index) {\n <div\n class=\"waveform-bar\"\n [style.width.px]=\"barWidth()\"\n [style.height.px]=\"barHeight(barValue($index))\"\n [style.border-radius.px]=\"barRadius()\"\n [style.background-color]=\"barColor($index)\"\n ></div>\n }\n</div>\n", styles: [".waveform{display:inline-flex;align-items:center}.waveform-bar{flex-shrink:0;transition:height 80ms ease-out}\n"] }]
173
173
  }], ctorParameters: () => [] });
174
174
 
175
175
  class AudioWaveformModule {
176
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
177
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformModule, imports: [AudioWaveformComponent], exports: [AudioWaveformComponent] }); }
178
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformModule }); }
176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
177
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformModule, imports: [AudioWaveformComponent], exports: [AudioWaveformComponent] }); }
178
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformModule }); }
179
179
  }
180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AudioWaveformModule, decorators: [{
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AudioWaveformModule, decorators: [{
181
181
  type: NgModule,
182
182
  args: [{
183
183
  imports: [AudioWaveformComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-audio-waveform.mjs","sources":["../../../components/audio-waveform/audio-waveform.model.ts","../../../components/audio-waveform/audio-waveform.service.ts","../../../components/audio-waveform/audio-waveform.component.ts","../../../components/audio-waveform/audio-waveform.component.html","../../../components/audio-waveform/audio-waveform.module.ts","../../../components/audio-waveform/testgorilla-tgo-ui-components-audio-waveform.ts"],"sourcesContent":["export interface AudioWaveformConfig {\n barCount: number;\n smoothing: number;\n fftSize: number;\n}\n\nexport const DEFAULT_AUDIO_WAVEFORM_CONFIG: AudioWaveformConfig = {\n barCount: 5,\n smoothing: 0.55,\n fftSize: 256,\n};\n\n/** Per-bar colors for the 5-bar waveform (left to right) */\nexport const AUDIO_WAVEFORM_BAR_COLORS: string[] = ['#C065D0', '#A86FDA', '#9078E3', '#7882EC', '#6889F3'];\n","import { Injectable, OnDestroy, signal } from '@angular/core';\nimport { DEFAULT_AUDIO_WAVEFORM_CONFIG } from './audio-waveform.model';\n\n@Injectable({ providedIn: 'root' })\nexport class AudioWaveformService implements OnDestroy {\n private ctx: AudioContext | null = null;\n private analyser: AnalyserNode | null = null;\n private source: MediaStreamAudioSourceNode | null = null;\n private stream: MediaStream | null = null;\n private raf: number | null = null;\n\n readonly bars = signal<number[]>([]);\n readonly active = signal<boolean>(false);\n\n async start(\n barCount = DEFAULT_AUDIO_WAVEFORM_CONFIG.barCount,\n smoothing = DEFAULT_AUDIO_WAVEFORM_CONFIG.smoothing\n ): Promise<void> {\n if (this.active()) return;\n\n try {\n this.stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.ctx = new AudioContext();\n this.analyser = this.ctx.createAnalyser();\n this.analyser.fftSize = DEFAULT_AUDIO_WAVEFORM_CONFIG.fftSize;\n this.analyser.smoothingTimeConstant = smoothing;\n this.source = this.ctx.createMediaStreamSource(this.stream);\n this.source.connect(this.analyser);\n this.active.set(true);\n\n const data = new Uint8Array(this.analyser.frequencyBinCount);\n // Focus on the lower ~60% of bins where speech energy concentrates\n const speechBinCount = Math.max(1, Math.floor(data.length * 0.6));\n\n const analyserRef = this.analyser;\n const tick = (): void => {\n analyserRef.getByteFrequencyData(data);\n\n // RMS (root mean square) of speech-range bins — represents perceived loudness,\n // unlike peak which saturates on any single spike\n let sumSq = 0;\n for (let i = 0; i < speechBinCount; i++) {\n const v = data[i] / 255;\n sumSq += v * v;\n }\n const rms = Math.sqrt(sumSq / speechBinCount);\n\n // Power curve keeps quiet→loud variation visible. Gain multiplier ensures\n // loud speech reaches full bar height. Clamped to [0, 1].\n const amplitude = Math.min(1, Math.pow(rms, 0.55) * 1.5);\n\n const values = this.createSymmetricBars(barCount, amplitude);\n this.bars.set(values);\n this.raf = requestAnimationFrame(tick);\n };\n tick();\n } catch (e) {\n console.error('[AudioWaveform] Mic access denied:', e);\n }\n }\n\n stop(): void {\n if (this.raf !== null) cancelAnimationFrame(this.raf);\n this.source?.disconnect();\n this.analyser?.disconnect();\n this.stream?.getTracks().forEach(t => t.stop());\n if (this.ctx && this.ctx.state !== 'closed') {\n void this.ctx.close();\n }\n this.ctx = null;\n this.analyser = null;\n this.source = null;\n this.stream = null;\n this.raf = null;\n this.active.set(false);\n this.bars.set([]);\n }\n\n ngOnDestroy(): void {\n this.stop();\n }\n\n /**\n * Creates a symmetric bar distribution where middle bars are highest.\n * Uses a bell-curve-like pattern centered at the middle bar.\n */\n private createSymmetricBars(barCount: number, amplitude: number): number[] {\n const center = (barCount - 1) / 2;\n const maxDistance = center;\n\n return Array.from({ length: barCount }, (_, i) => {\n const distance = Math.abs(i - center);\n // Weight decreases as distance from center increases\n // Using a quadratic falloff for smoother appearance\n const weight = 1 - (distance / maxDistance) * 0.65;\n return amplitude * weight;\n });\n }\n}\n","import { Component, ChangeDetectionStrategy, OnDestroy, computed, effect, inject, input } from '@angular/core';\nimport { AudioWaveformService } from './audio-waveform.service';\nimport { DEFAULT_AUDIO_WAVEFORM_CONFIG, AUDIO_WAVEFORM_BAR_COLORS } from './audio-waveform.model';\n\n@Component({\n selector: 'ui-audio-waveform',\n templateUrl: './audio-waveform.component.html',\n styleUrls: ['./audio-waveform.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [],\n})\nexport class AudioWaveformComponent implements OnDestroy {\n private readonly waveformService = inject(AudioWaveformService);\n\n readonly barCount = DEFAULT_AUDIO_WAVEFORM_CONFIG.barCount;\n readonly width = input<number>(40);\n readonly height = input<number>(22);\n readonly gap = input<number>(3);\n readonly minScale = input<number>(0.08);\n readonly smoothing = input<number>(DEFAULT_AUDIO_WAVEFORM_CONFIG.smoothing);\n\n /**\n * When provided, the component operates in controlled mode —\n * it renders externally-supplied bar values instead of managing the mic itself.\n */\n readonly bars = input<number[] | null>(null);\n\n /** Mirror of `bars` for controlled mode; required when `bars` is set. */\n readonly active = input<boolean | null>(null);\n\n readonly controlled = computed(() => this.active() !== null);\n\n readonly effectiveBars = computed(() => {\n if (this.controlled()) {\n return this.bars() ?? [];\n }\n return this.waveformService.bars();\n });\n\n readonly effectiveActive = computed(() => {\n if (this.controlled()) {\n return this.active() ?? false;\n }\n return this.waveformService.active();\n });\n\n readonly barWidth = computed(() => {\n const count = this.barCount;\n return (this.width() - this.gap() * (count - 1)) / count;\n });\n\n constructor() {\n effect(() => {\n if (!this.controlled()) {\n void this.waveformService.start(this.barCount, this.smoothing());\n }\n });\n }\n\n barHeight(value: number): number {\n const h = this.height();\n const min = this.minScale();\n return h * (min + value * (1 - min));\n }\n\n barRadius(): number {\n return this.barWidth() / 2;\n }\n\n barValue(index: number): number {\n const bars = this.effectiveBars();\n return bars[index] ?? 0;\n }\n\n barColor(index: number): string {\n return AUDIO_WAVEFORM_BAR_COLORS[index] ?? AUDIO_WAVEFORM_BAR_COLORS[0];\n }\n\n /** Returns the x-offset for a bar so the shared CSS gradient aligns correctly. */\n barOffset(index: number): number {\n return (this.barWidth() + this.gap()) * index;\n }\n\n ngOnDestroy(): void {\n if (!this.controlled()) {\n this.waveformService.stop();\n }\n }\n}\n","<div\n class=\"waveform\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.gap.px]=\"gap()\"\n role=\"img\"\n [attr.aria-label]=\"effectiveActive() ? 'Audio waveform active' : 'Audio waveform inactive'\"\n>\n @for (item of effectiveBars(); track $index) {\n <div\n class=\"waveform-bar\"\n [style.width.px]=\"barWidth()\"\n [style.height.px]=\"barHeight(barValue($index))\"\n [style.border-radius.px]=\"barRadius()\"\n [style.background-color]=\"barColor($index)\"\n ></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AudioWaveformComponent } from './audio-waveform.component';\n\n@NgModule({\n imports: [AudioWaveformComponent],\n exports: [AudioWaveformComponent],\n})\nexport class AudioWaveformModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAMO,MAAM,6BAA6B,GAAwB;AAChE,IAAA,QAAQ,EAAE,CAAC;AACX,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,OAAO,EAAE,GAAG;;AAGd;AACO,MAAM,yBAAyB,GAAa,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;;MCT5F,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;QAEU,IAAA,CAAA,GAAG,GAAwB,IAAI;QAC/B,IAAA,CAAA,QAAQ,GAAwB,IAAI;QACpC,IAAA,CAAA,MAAM,GAAsC,IAAI;QAChD,IAAA,CAAA,MAAM,GAAuB,IAAI;QACjC,IAAA,CAAA,GAAG,GAAkB,IAAI;AAExB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAW,EAAE,CAAC;AAC3B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAU,KAAK,CAAC;AAsFzC,IAAA;AApFC,IAAA,MAAM,KAAK,CACT,QAAQ,GAAG,6BAA6B,CAAC,QAAQ,EACjD,SAAS,GAAG,6BAA6B,CAAC,SAAS,EAAA;QAEnD,IAAI,IAAI,CAAC,MAAM,EAAE;YAAE;AAEnB,QAAA,IAAI;AACF,YAAA,IAAI,CAAC,MAAM,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACxE,YAAA,IAAI,CAAC,GAAG,GAAG,IAAI,YAAY,EAAE;YAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,cAA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BAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,eAAA,EAGZ,uBAAuB,CAAC,MAAM,WACtC,EAAE,EAAA,QAAA,EAAA,yiBAAA,EAAA,MAAA,EAAA,CAAA,iHAAA,CAAA,EAAA;;;MEFA,mBAAmB,CAAA;+GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CACtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;gHAErB,mBAAmB,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-audio-waveform.mjs","sources":["../../../components/audio-waveform/audio-waveform.model.ts","../../../components/audio-waveform/audio-waveform.service.ts","../../../components/audio-waveform/audio-waveform.component.ts","../../../components/audio-waveform/audio-waveform.component.html","../../../components/audio-waveform/audio-waveform.module.ts","../../../components/audio-waveform/testgorilla-tgo-ui-components-audio-waveform.ts"],"sourcesContent":["export interface AudioWaveformConfig {\n barCount: number;\n smoothing: number;\n fftSize: number;\n}\n\nexport const DEFAULT_AUDIO_WAVEFORM_CONFIG: AudioWaveformConfig = {\n barCount: 5,\n smoothing: 0.55,\n fftSize: 256,\n};\n\n/** Per-bar colors for the 5-bar waveform (left to right) */\nexport const AUDIO_WAVEFORM_BAR_COLORS: string[] = ['#C065D0', '#A86FDA', '#9078E3', '#7882EC', '#6889F3'];\n","import { Injectable, OnDestroy, signal } from '@angular/core';\nimport { DEFAULT_AUDIO_WAVEFORM_CONFIG } from './audio-waveform.model';\n\n@Injectable({ providedIn: 'root' })\nexport class AudioWaveformService implements OnDestroy {\n private ctx: AudioContext | null = null;\n private analyser: AnalyserNode | null = null;\n private source: MediaStreamAudioSourceNode | null = null;\n private stream: MediaStream | null = null;\n private raf: number | null = null;\n\n readonly bars = signal<number[]>([]);\n readonly active = signal<boolean>(false);\n\n async start(\n barCount = DEFAULT_AUDIO_WAVEFORM_CONFIG.barCount,\n smoothing = DEFAULT_AUDIO_WAVEFORM_CONFIG.smoothing\n ): Promise<void> {\n if (this.active()) return;\n\n try {\n this.stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.ctx = new AudioContext();\n this.analyser = this.ctx.createAnalyser();\n this.analyser.fftSize = DEFAULT_AUDIO_WAVEFORM_CONFIG.fftSize;\n this.analyser.smoothingTimeConstant = smoothing;\n this.source = this.ctx.createMediaStreamSource(this.stream);\n this.source.connect(this.analyser);\n this.active.set(true);\n\n const data = new Uint8Array(this.analyser.frequencyBinCount);\n // Focus on the lower ~60% of bins where speech energy concentrates\n const speechBinCount = Math.max(1, Math.floor(data.length * 0.6));\n\n const analyserRef = this.analyser;\n const tick = (): void => {\n analyserRef.getByteFrequencyData(data);\n\n // RMS (root mean square) of speech-range bins — represents perceived loudness,\n // unlike peak which saturates on any single spike\n let sumSq = 0;\n for (let i = 0; i < speechBinCount; i++) {\n const v = data[i] / 255;\n sumSq += v * v;\n }\n const rms = Math.sqrt(sumSq / speechBinCount);\n\n // Power curve keeps quiet→loud variation visible. Gain multiplier ensures\n // loud speech reaches full bar height. Clamped to [0, 1].\n const amplitude = Math.min(1, Math.pow(rms, 0.55) * 1.5);\n\n const values = this.createSymmetricBars(barCount, amplitude);\n this.bars.set(values);\n this.raf = requestAnimationFrame(tick);\n };\n tick();\n } catch (e) {\n console.error('[AudioWaveform] Mic access denied:', e);\n }\n }\n\n stop(): void {\n if (this.raf !== null) cancelAnimationFrame(this.raf);\n this.source?.disconnect();\n this.analyser?.disconnect();\n this.stream?.getTracks().forEach(t => t.stop());\n if (this.ctx && this.ctx.state !== 'closed') {\n void this.ctx.close();\n }\n this.ctx = null;\n this.analyser = null;\n this.source = null;\n this.stream = null;\n this.raf = null;\n this.active.set(false);\n this.bars.set([]);\n }\n\n ngOnDestroy(): void {\n this.stop();\n }\n\n /**\n * Creates a symmetric bar distribution where middle bars are highest.\n * Uses a bell-curve-like pattern centered at the middle bar.\n */\n private createSymmetricBars(barCount: number, amplitude: number): number[] {\n const center = (barCount - 1) / 2;\n const maxDistance = center;\n\n return Array.from({ length: barCount }, (_, i) => {\n const distance = Math.abs(i - center);\n // Weight decreases as distance from center increases\n // Using a quadratic falloff for smoother appearance\n const weight = 1 - (distance / maxDistance) * 0.65;\n return amplitude * weight;\n });\n }\n}\n","import { Component, ChangeDetectionStrategy, OnDestroy, computed, effect, inject, input } from '@angular/core';\nimport { AudioWaveformService } from './audio-waveform.service';\nimport { DEFAULT_AUDIO_WAVEFORM_CONFIG, AUDIO_WAVEFORM_BAR_COLORS } from './audio-waveform.model';\n\n@Component({\n selector: 'ui-audio-waveform',\n templateUrl: './audio-waveform.component.html',\n styleUrls: ['./audio-waveform.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [],\n})\nexport class AudioWaveformComponent implements OnDestroy {\n private readonly waveformService = inject(AudioWaveformService);\n\n readonly barCount = DEFAULT_AUDIO_WAVEFORM_CONFIG.barCount;\n readonly width = input<number>(40);\n readonly height = input<number>(22);\n readonly gap = input<number>(3);\n readonly minScale = input<number>(0.08);\n readonly smoothing = input<number>(DEFAULT_AUDIO_WAVEFORM_CONFIG.smoothing);\n\n /**\n * When provided, the component operates in controlled mode —\n * it renders externally-supplied bar values instead of managing the mic itself.\n */\n readonly bars = input<number[] | null>(null);\n\n /** Mirror of `bars` for controlled mode; required when `bars` is set. */\n readonly active = input<boolean | null>(null);\n\n readonly controlled = computed(() => this.active() !== null);\n\n readonly effectiveBars = computed(() => {\n if (this.controlled()) {\n return this.bars() ?? [];\n }\n return this.waveformService.bars();\n });\n\n readonly effectiveActive = computed(() => {\n if (this.controlled()) {\n return this.active() ?? false;\n }\n return this.waveformService.active();\n });\n\n readonly barWidth = computed(() => {\n const count = this.barCount;\n return (this.width() - this.gap() * (count - 1)) / count;\n });\n\n constructor() {\n effect(() => {\n if (!this.controlled()) {\n void this.waveformService.start(this.barCount, this.smoothing());\n }\n });\n }\n\n barHeight(value: number): number {\n const h = this.height();\n const min = this.minScale();\n return h * (min + value * (1 - min));\n }\n\n barRadius(): number {\n return this.barWidth() / 2;\n }\n\n barValue(index: number): number {\n const bars = this.effectiveBars();\n return bars[index] ?? 0;\n }\n\n barColor(index: number): string {\n return AUDIO_WAVEFORM_BAR_COLORS[index] ?? AUDIO_WAVEFORM_BAR_COLORS[0];\n }\n\n /** Returns the x-offset for a bar so the shared CSS gradient aligns correctly. */\n barOffset(index: number): number {\n return (this.barWidth() + this.gap()) * index;\n }\n\n ngOnDestroy(): void {\n if (!this.controlled()) {\n this.waveformService.stop();\n }\n }\n}\n","<div\n class=\"waveform\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.gap.px]=\"gap()\"\n role=\"img\"\n [attr.aria-label]=\"effectiveActive() ? 'Audio waveform active' : 'Audio waveform inactive'\"\n>\n @for (item of effectiveBars(); track $index) {\n <div\n class=\"waveform-bar\"\n [style.width.px]=\"barWidth()\"\n [style.height.px]=\"barHeight(barValue($index))\"\n [style.border-radius.px]=\"barRadius()\"\n [style.background-color]=\"barColor($index)\"\n ></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { AudioWaveformComponent } from './audio-waveform.component';\n\n@NgModule({\n imports: [AudioWaveformComponent],\n exports: [AudioWaveformComponent],\n})\nexport class AudioWaveformModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAMa,MAAA,6BAA6B,GAAwB;A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