@testgorilla/tgo-ui 6.2.3 → 6.2.8

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 (165) hide show
  1. package/README.md +158 -53
  2. package/components/autocomplete/autocomplete.component.d.ts +2 -2
  3. package/components/badge/badge.component.d.ts +6 -6
  4. package/components/button/button.component.d.ts +4 -4
  5. package/components/checklist/checklist.component.d.ts +4 -5
  6. package/components/deprecated-paginator/deprecated-paginator.component.d.ts +2 -6
  7. package/components/dialog/dialog.component.d.ts +1 -1
  8. package/components/dialog/dialog.model.d.ts +2 -2
  9. package/components/dropdown/dropdown.component.d.ts +2 -2
  10. package/components/empty-state/empty-state.component.d.ts +2 -2
  11. package/components/file-upload/file-upload.component.d.ts +1 -1
  12. package/components/icon/icon-svg-content.d.ts +1 -1
  13. package/components/icon/icon.component.d.ts +2 -2
  14. package/components/icon/icon.model.d.ts +3 -3
  15. package/components/icon-label/icon-label.component.d.ts +1 -3
  16. package/components/logo/logo.component.d.ts +1 -1
  17. package/components/multi-input/multi-input.component.d.ts +1 -1
  18. package/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.d.ts +3 -3
  19. package/components/overflow-menu/overflow-menu.model.d.ts +1 -0
  20. package/components/password-criteria/password.component.d.ts +1 -1
  21. package/components/radial-progress/radial-progress.component.d.ts +2 -2
  22. package/components/radio-button/radio-button.component.d.ts +3 -3
  23. package/components/segmented-bar/segmented-bar.component.d.ts +1 -1
  24. package/components/segmented-button/segmented-button.component.d.ts +1 -1
  25. package/components/side-panel/side-panel.model.d.ts +1 -1
  26. package/components/side-sheet/side-sheet.component.d.ts +1 -1
  27. package/components/spider-chart/spider-chart.component.d.ts +2 -2
  28. package/components/spider-chart/spider-chart.model.d.ts +2 -2
  29. package/components/stepper/step-line-element.directive.d.ts +1 -1
  30. package/components/stepper/step.component.d.ts +1 -1
  31. package/components/stepper/stepper.component.d.ts +2 -2
  32. package/components/table/table.component.d.ts +2 -2
  33. package/components/tabs/tabs.component.d.ts +2 -2
  34. package/components/universal-skills/universal-skills-report.component.d.ts +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +7 -25
  36. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +2 -2
  38. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +0 -1
  40. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
  42. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +31 -18
  43. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  44. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  46. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +6 -6
  47. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
  48. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +39 -19
  49. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  50. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +2 -2
  51. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  52. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +38 -10
  53. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  54. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +2 -2
  55. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  56. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +22 -16
  57. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  58. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +6 -6
  59. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  60. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +8 -8
  61. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  62. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +2 -2
  63. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
  64. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +2 -2
  65. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
  66. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +18 -5
  67. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  68. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +2 -2
  69. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
  70. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  71. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +2 -3
  72. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  73. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +5 -5
  74. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  75. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +2 -3
  76. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  77. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +8 -7
  78. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
  79. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +0 -1
  80. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
  81. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +1 -1
  82. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
  83. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +1 -1
  84. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  85. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +2 -2
  86. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +2 -7
  88. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  89. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +2 -2
  90. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  91. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +1 -3
  92. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  93. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +5 -5
  94. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  95. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +28 -6
  96. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  97. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +2 -2
  98. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  99. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  100. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +4 -4
  101. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  102. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +3 -3
  103. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
  104. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +6 -6
  105. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  106. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1 -1
  108. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  109. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +5 -3
  110. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  111. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +42 -10
  112. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  113. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +3 -3
  114. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  115. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +2 -2
  116. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  117. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +3 -3
  118. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  119. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +4 -4
  120. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  121. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +1 -1
  122. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  123. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  124. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +3 -3
  125. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  126. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +4 -4
  127. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  128. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
  129. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +2 -2
  130. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +21 -5
  131. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  132. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +3 -3
  133. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
  134. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
  135. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +14 -11
  136. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  137. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +5 -5
  138. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  139. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +3 -3
  140. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  141. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +25 -7
  142. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  143. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +25 -9
  144. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  145. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +14 -15
  146. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
  147. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +6 -6
  148. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
  149. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +2 -2
  150. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  151. package/fesm2022/testgorilla-tgo-ui.mjs +2 -7
  152. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  153. package/package.json +85 -79
  154. package/projects/tgo-canopy-ui/theme/_alert-bars.scss +2 -1
  155. package/projects/tgo-canopy-ui/theme/_breakpoints-mixin.scss +6 -6
  156. package/projects/tgo-canopy-ui/theme/_core.scss +1 -1
  157. package/projects/tgo-canopy-ui/theme/_icon.scss +1 -1
  158. package/projects/tgo-canopy-ui/theme/_input.scss +108 -65
  159. package/projects/tgo-canopy-ui/theme/_lib-styles.scss +8 -7
  160. package/projects/tgo-canopy-ui/theme/_mat-paginator.scss +11 -10
  161. package/projects/tgo-canopy-ui/theme/_palette.scss +41 -29
  162. package/projects/tgo-canopy-ui/theme/_tooltip.scss +30 -30
  163. package/projects/tgo-canopy-ui/theme/_typography.scss +24 -14
  164. package/projects/tgo-canopy-ui/theme/_variables.scss +56 -56
  165. package/projects/tgo-canopy-ui/theme/theme.scss +19 -18
@@ -169,19 +169,21 @@ class TagComponent {
169
169
  return this.readOnly || this.allowClose || this.isSelected;
170
170
  }
171
171
  onKeydown($event) {
172
- if (($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE) && !this.closeBtnFocused()) {
172
+ if (($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE) &&
173
+ !this.closeBtnFocused()) {
173
174
  this.onPress();
174
175
  }
175
- else if (this.closeBtnFocused() && ($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE)) {
176
+ else if (this.closeBtnFocused() &&
177
+ ($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE)) {
176
178
  this.onClose();
177
179
  }
178
180
  }
179
181
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TagComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
180
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: TagComponent, isStandalone: false, selector: "ui-tag", inputs: { label: "label", icon: "icon", allowClose: "allowClose", readOnly: "readOnly", isSelected: "isSelected", showIconWhenSelected: "showIconWhenSelected", isDisabled: "isDisabled", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired" }, outputs: { close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true }], ngImport: i0, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\" [matTooltipClass]=\"applicationTheme\"\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n shrink\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\" (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\" (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\" (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel || labelText\"\n [attr.aria-required]=\"ariaRequired\"\n >\n <ui-icon *ngIf=\"icon\" class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n <ui-icon *ngIf=\"isSelected && showIconWhenSelected\" [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon (focus)=\"closeBtnFocused.set(true)\" (blur)=\"closeBtnFocused.set(false)\" [tabindex]=\"tabIndex\" *ngIf=\"allowClose\" class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\" (click)=\"onClose()\" [name]=\"'Close'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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 .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894A0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #E9F0F1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1B4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894A0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border:1px solid transparent;border-radius:50px;padding:2px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{background:#f4f4f4;border:2px solid transparent}:host .tag-container[theme=dark].filled,:host .tag-container[theme=light].filled{background-color:#fff;border-color:#242424}:host .tag-container[theme=dark]:hover,:host .tag-container[theme=light]:hover{background-color:#666;color:#fff;border-color:#666;border-width:2px}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\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.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.UiTranslatePipe, name: "uiTranslate" }] }); }
182
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: TagComponent, isStandalone: false, selector: "ui-tag", inputs: { label: "label", icon: "icon", allowClose: "allowClose", readOnly: "readOnly", isSelected: "isSelected", showIconWhenSelected: "showIconWhenSelected", isDisabled: "isDisabled", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired" }, outputs: { close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true }], ngImport: i0, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\"\n [matTooltipClass]=\"applicationTheme\"\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel || labelText\"\n [attr.aria-required]=\"ariaRequired\"\n >\n <ui-icon\n *ngIf=\"icon\"\n class=\"icon\"\n [color]=\"iconColor\"\n [name]=\"iconToPass\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <ui-icon\n *ngIf=\"isSelected && showIconWhenSelected\"\n [color]=\"iconColor\"\n class=\"icon\"\n [name]=\"'Check'\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex\"\n *ngIf=\"allowClose\"\n class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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 .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border:1px solid transparent;border-radius:50px;padding:2px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{background:#f4f4f4;border:2px solid transparent}:host .tag-container[theme=dark].filled,:host .tag-container[theme=light].filled{background-color:#fff;border-color:#242424}:host .tag-container[theme=dark]:hover,:host .tag-container[theme=light]:hover{background-color:#666;color:#fff;border-color:#666;border-width:2px}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\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.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.UiTranslatePipe, name: "uiTranslate" }] }); }
181
183
  }
182
184
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TagComponent, decorators: [{
183
185
  type: Component,
184
- args: [{ selector: 'ui-tag', standalone: false, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\" [matTooltipClass]=\"applicationTheme\"\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n shrink\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\" (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\" (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\" (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel || labelText\"\n [attr.aria-required]=\"ariaRequired\"\n >\n <ui-icon *ngIf=\"icon\" class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n <ui-icon *ngIf=\"isSelected && showIconWhenSelected\" [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon (focus)=\"closeBtnFocused.set(true)\" (blur)=\"closeBtnFocused.set(false)\" [tabindex]=\"tabIndex\" *ngIf=\"allowClose\" class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\" (click)=\"onClose()\" [name]=\"'Close'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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 .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894A0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #E9F0F1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1B4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894A0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border:1px solid transparent;border-radius:50px;padding:2px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{background:#f4f4f4;border:2px solid transparent}:host .tag-container[theme=dark].filled,:host .tag-container[theme=light].filled{background-color:#fff;border-color:#242424}:host .tag-container[theme=dark]:hover,:host .tag-container[theme=light]:hover{background-color:#666;color:#fff;border-color:#666;border-width:2px}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
186
+ args: [{ selector: 'ui-tag', standalone: false, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\"\n [matTooltipClass]=\"applicationTheme\"\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel || labelText\"\n [attr.aria-required]=\"ariaRequired\"\n >\n <ui-icon\n *ngIf=\"icon\"\n class=\"icon\"\n [color]=\"iconColor\"\n [name]=\"iconToPass\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <ui-icon\n *ngIf=\"isSelected && showIconWhenSelected\"\n [color]=\"iconColor\"\n class=\"icon\"\n [name]=\"'Check'\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex\"\n *ngIf=\"allowClose\"\n class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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 .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border:1px solid transparent;border-radius:50px;padding:2px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{background:#f4f4f4;border:2px solid transparent}:host .tag-container[theme=dark].filled,:host .tag-container[theme=light].filled{background-color:#fff;border-color:#242424}:host .tag-container[theme=dark]:hover,:host .tag-container[theme=light]:hover{background-color:#666;color:#fff;border-color:#666;border-width:2px}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
185
187
  }], ctorParameters: () => [{ type: undefined, decorators: [{
186
188
  type: Optional
187
189
  }, {
@@ -218,14 +220,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
218
220
 
219
221
  class TagComponentModule {
220
222
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TagComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
221
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: TagComponentModule, declarations: [TagComponent], imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule, MatInputModule, UiTranslatePipe], exports: [TagComponent] }); }
222
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TagComponentModule, imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule, MatInputModule] }); }
223
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: TagComponentModule, declarations: [TagComponent], imports: [CommonModule,
224
+ IconComponentModule,
225
+ TooltipComponentModule,
226
+ MatTooltipModule,
227
+ MatInputModule,
228
+ UiTranslatePipe], exports: [TagComponent] }); }
229
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TagComponentModule, imports: [CommonModule,
230
+ IconComponentModule,
231
+ TooltipComponentModule,
232
+ MatTooltipModule,
233
+ MatInputModule] }); }
223
234
  }
224
235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TagComponentModule, decorators: [{
225
236
  type: NgModule,
226
237
  args: [{
227
238
  declarations: [TagComponent],
228
- imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule, MatInputModule, UiTranslatePipe],
239
+ imports: [
240
+ CommonModule,
241
+ IconComponentModule,
242
+ TooltipComponentModule,
243
+ MatTooltipModule,
244
+ MatInputModule,
245
+ UiTranslatePipe,
246
+ ],
229
247
  exports: [TagComponent],
230
248
  providers: [],
231
249
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-tag.mjs","sources":["../../../components/tag/tag.component.ts","../../../components/tag/tag.component.html","../../../components/tag/tag.component.module.ts","../../../components/tag/testgorilla-tgo-ui-components-tag.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n signal,\n ViewChild\n} from '@angular/core';\nimport { debounceTime, map, ReplaySubject } from 'rxjs';\nimport { IconColor, IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IKeyboardEvent } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-tag',\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n standalone: false\n})\nexport class TagComponent implements AfterViewInit, OnInit {\n /**\n * Tag's label\n *\n * @memberof TagComponent\n */\n @Input() set label(value: string) {\n this.labelText = value;\n if (this.labelElement) {\n this.isLabelEllipseActive();\n }\n }\n\n /**\n * Icon\n *\n * @type {string}\n * @memberof TagComponent\n */\n @Input() icon: IconName = '';\n\n /**\n * Whether to allow the tag to be closed.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() allowClose = false;\n\n /**\n * Whether the tag is in read-only mode.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() readOnly = false;\n\n /**\n * Whether the tag is selected.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() isSelected = false;\n\n /**\n * Display icon when is selected\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() showIconWhenSelected = false;\n\n /**\n * Specifies whether the element is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() isDisabled = false;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof TagComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof TagComponent\n */\n @Input() ariaLabel: string;\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 {boolean}\n * @memberof TagComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Event triggered when the tag should be closed.\n *\n * @event\n * @memberof TagComponent\n */\n @Output() close = new EventEmitter<void>();\n\n /**\n * Event triggered when a press action occurs.\n *\n * @event\n * @memberof TagComponent\n */\n @Output() press = new EventEmitter<boolean>();\n\n /**\n * Subject that needs to be triggered when Label input changes, to check if it's truncated\n * @private\n * @type {void}\n * @memberof TagComponent\n */\n private checkLabelEllipsis$ = new ReplaySubject<void>(1);\n\n /**\n * Observable that indicates if the Label is truncated\n * debounceTime is used to wait for view to be initialized after receiving a new Label input\n * @protected\n * @type {boolean}\n * @memberof TagComponent\n */\n protected isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(\n debounceTime(100),\n map(() => {\n const el = this.labelElement.nativeElement;\n return el.offsetWidth < el.scrollWidth;\n })\n );\n protected labelText = '';\n protected isHovered = false;\n protected shrink = false;\n protected iconToPass: IconName;\n protected iconColor: IconColor;\n protected closeBtnFocused = signal(false);\n\n @ViewChild('labelElement') labelElement: ElementRef<HTMLElement>;\n\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 ngOnInit(): void {\n this.iconToPass = this.icon;\n this.iconColor = 'black';\n }\n\n ngAfterViewInit(): void {\n this.isLabelEllipseActive();\n }\n\n onPress(): void {\n if (!this.readOnly && !this.allowClose) {\n this.isSelected = this.showIconWhenSelected ? !this.isSelected : false;\n this.press.emit(this.isSelected);\n }\n }\n\n setHoverState(state: boolean) {\n this.isHovered = state;\n if (this.applicationTheme !== 'classic') {\n if (state) {\n this.iconToPass = `${this.icon}-filled` as IconName;\n } else {\n this.iconToPass = this.icon;\n }\n this.iconColor = this.isHovered ? 'white' : 'black';\n }\n }\n\n setShrinkState(state: boolean) {\n this.shrink = state;\n }\n\n onClose(): void {\n this.close.emit();\n }\n\n private isLabelEllipseActive(): void {\n this.checkLabelEllipsis$.next();\n }\n\n get tabIndex(): number {\n return this.isDisabled || this.readOnly ? -1 : 0;\n }\n\n get filled(): boolean {\n return this.readOnly || this.allowClose || this.isSelected;\n }\n\n onKeydown($event: KeyboardEvent): void {\n if (($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE) && !this.closeBtnFocused()) {\n this.onPress();\n } else if (this.closeBtnFocused() && ($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE)) {\n this.onClose();\n }\n }\n}\n","<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\" [matTooltipClass]=\"applicationTheme\"\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n shrink\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\" (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\" (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\" (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel || labelText\"\n [attr.aria-required]=\"ariaRequired\"\n >\n <ui-icon *ngIf=\"icon\" class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n <ui-icon *ngIf=\"isSelected && showIconWhenSelected\" [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon (focus)=\"closeBtnFocused.set(true)\" (blur)=\"closeBtnFocused.set(false)\" [tabindex]=\"tabIndex\" *ngIf=\"allowClose\" class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\" (click)=\"onClose()\" [name]=\"'Close'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { TagComponent } from './tag.component';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponentModule } from '@testgorilla/tgo-ui/components/tooltip';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatInputModule } from \"@angular/material/input\";\nimport { UiTranslatePipe } from \"@testgorilla/tgo-ui/components/core\";\n\n@NgModule({\n declarations: [TagComponent],\n imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule, MatInputModule, UiTranslatePipe],\n exports: [TagComponent],\n providers: [],\n})\nexport class TagComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAwBa,YAAY,CAAA;AACvB;;;;AAIG;IACH,IAAa,KAAK,C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AE,eAAe,CAAC;oBACvH,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-tag.mjs","sources":["../../../components/tag/tag.component.ts","../../../components/tag/tag.component.html","../../../components/tag/tag.component.module.ts","../../../components/tag/testgorilla-tgo-ui-components-tag.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n signal,\n ViewChild,\n} from '@angular/core';\nimport { debounceTime, map, ReplaySubject } from 'rxjs';\nimport { IconColor, IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IKeyboardEvent } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-tag',\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n standalone: false,\n})\nexport class TagComponent implements AfterViewInit, OnInit {\n /**\n * Tag's label\n *\n * @memberof TagComponent\n */\n @Input() set label(value: string) {\n this.labelText = value;\n if (this.labelElement) {\n this.isLabelEllipseActive();\n }\n }\n\n /**\n * Icon\n *\n * @type {string}\n * @memberof TagComponent\n */\n @Input() icon: IconName = '';\n\n /**\n * Whether to allow the tag to be closed.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() allowClose = false;\n\n /**\n * Whether the tag is in read-only mode.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() readOnly = false;\n\n /**\n * Whether the tag is selected.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() isSelected = false;\n\n /**\n * Display icon when is selected\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() showIconWhenSelected = false;\n\n /**\n * Specifies whether the element is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n @Input() isDisabled = false;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof TagComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof TagComponent\n */\n @Input() ariaLabel: string;\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 {boolean}\n * @memberof TagComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Event triggered when the tag should be closed.\n *\n * @event\n * @memberof TagComponent\n */\n @Output() close = new EventEmitter<void>();\n\n /**\n * Event triggered when a press action occurs.\n *\n * @event\n * @memberof TagComponent\n */\n @Output() press = new EventEmitter<boolean>();\n\n /**\n * Subject that needs to be triggered when Label input changes, to check if it's truncated\n * @private\n * @type {void}\n * @memberof TagComponent\n */\n private checkLabelEllipsis$ = new ReplaySubject<void>(1);\n\n /**\n * Observable that indicates if the Label is truncated\n * debounceTime is used to wait for view to be initialized after receiving a new Label input\n * @protected\n * @type {boolean}\n * @memberof TagComponent\n */\n protected isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(\n debounceTime(100),\n map(() => {\n const el = this.labelElement.nativeElement;\n return el.offsetWidth < el.scrollWidth;\n })\n );\n protected labelText = '';\n protected isHovered = false;\n protected shrink = false;\n protected iconToPass: IconName;\n protected iconColor: IconColor;\n protected closeBtnFocused = signal(false);\n\n @ViewChild('labelElement') labelElement: ElementRef<HTMLElement>;\n\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 ngOnInit(): void {\n this.iconToPass = this.icon;\n this.iconColor = 'black';\n }\n\n ngAfterViewInit(): void {\n this.isLabelEllipseActive();\n }\n\n onPress(): void {\n if (!this.readOnly && !this.allowClose) {\n this.isSelected = this.showIconWhenSelected ? !this.isSelected : false;\n this.press.emit(this.isSelected);\n }\n }\n\n setHoverState(state: boolean) {\n this.isHovered = state;\n if (this.applicationTheme !== 'classic') {\n if (state) {\n this.iconToPass = `${this.icon}-filled` as IconName;\n } else {\n this.iconToPass = this.icon;\n }\n this.iconColor = this.isHovered ? 'white' : 'black';\n }\n }\n\n setShrinkState(state: boolean) {\n this.shrink = state;\n }\n\n onClose(): void {\n this.close.emit();\n }\n\n private isLabelEllipseActive(): void {\n this.checkLabelEllipsis$.next();\n }\n\n get tabIndex(): number {\n return this.isDisabled || this.readOnly ? -1 : 0;\n }\n\n get filled(): boolean {\n return this.readOnly || this.allowClose || this.isSelected;\n }\n\n onKeydown($event: KeyboardEvent): void {\n if (\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string)) &&\n !this.closeBtnFocused()\n ) {\n this.onPress();\n } else if (\n this.closeBtnFocused() &&\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string))\n ) {\n this.onClose();\n }\n }\n}\n","<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\"\n [matTooltipClass]=\"applicationTheme\"\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel || labelText\"\n [attr.aria-required]=\"ariaRequired\"\n >\n <ui-icon\n *ngIf=\"icon\"\n class=\"icon\"\n [color]=\"iconColor\"\n [name]=\"iconToPass\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <ui-icon\n *ngIf=\"isSelected && showIconWhenSelected\"\n [color]=\"iconColor\"\n class=\"icon\"\n [name]=\"'Check'\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex\"\n *ngIf=\"allowClose\"\n class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { TagComponent } from './tag.component';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponentModule } from '@testgorilla/tgo-ui/components/tooltip';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatInputModule } from '@angular/material/input';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [TagComponent],\n imports: [\n CommonModule,\n IconComponentModule,\n TooltipComponentModule,\n MatTooltipModule,\n MatInputModule,\n UiTranslatePipe,\n ],\n exports: [TagComponent],\n providers: [],\n})\nexport class TagComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAwBa,YAAY,CAAA;AACvB;;;;AAIG;IACH,IAAa,KAAK,CAAC,KAAa,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;AACtB,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,oBAAoB,EAAE;QAC7B;IACF;AA+HA,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAA,CAAA,eAA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elTooltip = false;
94
- this.onChange = () => {
95
- };
96
- this.onTouched = () => {
97
- };
94
+ this.onChange = () => { };
95
+ this.onTouched = () => { };
98
96
  if (defaultAppTheme) {
99
97
  this.applicationTheme = defaultAppTheme;
100
98
  }
@@ -149,7 +147,7 @@ class ToggleComponent {
149
147
  useExisting: forwardRef(() => ToggleComponent),
150
148
  multi: true,
151
149
  },
152
- ], usesOnChanges: true, ngImport: i0, template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n [tabIndex]=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ 'active': selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n <div class=\"knob\" *ngIf=\"!loading; else loadingTemplate\" [ngClass]=\"{ selected }\">\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" *ngIf=\"selected && !label\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n </div>\n\n <ng-template #loadingTemplate>\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n </ng-template>\n </div>\n <div *ngIf=\"message && selected\" class=\"message\">{{ message }}</div>\n</div>\n\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #D410AA}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "component", type: i4.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i5.SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }] }); }
150
+ ], usesOnChanges: true, ngImport: i0, template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n <div class=\"knob\" *ngIf=\"!loading; else loadingTemplate\" [ngClass]=\"{ selected }\">\n <ui-icon\n [color]=\"disabled ? 'grey' : 'white'\"\n *ngIf=\"selected && !label\"\n [size]=\"'16'\"\n [name]=\"'Check-round-filled'\"\n ></ui-icon>\n </div>\n\n <ng-template #loadingTemplate>\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n </ng-template>\n </div>\n <div *ngIf=\"message && selected\" class=\"message\">{{ message }}</div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #d410aa}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "component", type: i4.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i5.SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }] }); }
153
151
  }
154
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponent, decorators: [{
155
153
  type: Component,
@@ -159,7 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
159
157
  useExisting: forwardRef(() => ToggleComponent),
160
158
  multi: true,
161
159
  },
162
- ], standalone: false, template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n [tabIndex]=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ 'active': selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n <div class=\"knob\" *ngIf=\"!loading; else loadingTemplate\" [ngClass]=\"{ selected }\">\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" *ngIf=\"selected && !label\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n </div>\n\n <ng-template #loadingTemplate>\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n </ng-template>\n </div>\n <div *ngIf=\"message && selected\" class=\"message\">{{ message }}</div>\n</div>\n\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #D410AA}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
160
+ ], standalone: false, template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n <div class=\"knob\" *ngIf=\"!loading; else loadingTemplate\" [ngClass]=\"{ selected }\">\n <ui-icon\n [color]=\"disabled ? 'grey' : 'white'\"\n *ngIf=\"selected && !label\"\n [size]=\"'16'\"\n [name]=\"'Check-round-filled'\"\n ></ui-icon>\n </div>\n\n <ng-template #loadingTemplate>\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n </ng-template>\n </div>\n <div *ngIf=\"message && selected\" class=\"message\">{{ message }}</div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.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{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #d410aa}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
163
161
  }], ctorParameters: () => [{ type: undefined, decorators: [{
164
162
  type: Optional
165
163
  }, {
@@ -196,14 +194,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
196
194
 
197
195
  class ToggleComponentModule {
198
196
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
199
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponentModule, declarations: [ToggleComponent], imports: [CommonModule, MatTooltipModule, EllipseTextDirective, MatInputModule, UiTranslatePipe, IconComponentModule, SpinnerComponentModule], exports: [ToggleComponent] }); }
200
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponentModule, imports: [CommonModule, MatTooltipModule, MatInputModule, IconComponentModule, SpinnerComponentModule] }); }
197
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponentModule, declarations: [ToggleComponent], imports: [CommonModule,
198
+ MatTooltipModule,
199
+ EllipseTextDirective,
200
+ MatInputModule,
201
+ UiTranslatePipe,
202
+ IconComponentModule,
203
+ SpinnerComponentModule], exports: [ToggleComponent] }); }
204
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponentModule, imports: [CommonModule,
205
+ MatTooltipModule,
206
+ MatInputModule,
207
+ IconComponentModule,
208
+ SpinnerComponentModule] }); }
201
209
  }
202
210
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponentModule, decorators: [{
203
211
  type: NgModule,
204
212
  args: [{
205
213
  declarations: [ToggleComponent],
206
- imports: [CommonModule, MatTooltipModule, EllipseTextDirective, MatInputModule, UiTranslatePipe, IconComponentModule, SpinnerComponentModule],
214
+ imports: [
215
+ CommonModule,
216
+ MatTooltipModule,
217
+ EllipseTextDirective,
218
+ MatInputModule,
219
+ UiTranslatePipe,
220
+ IconComponentModule,
221
+ SpinnerComponentModule,
222
+ ],
207
223
  exports: [ToggleComponent],
208
224
  }]
209
225
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-toggle.mjs","sources":["../../../components/toggle/toggle.component.ts","../../../components/toggle/toggle.component.html","../../../components/toggle/toggle.component.module.ts","../../../components/toggle/testgorilla-tgo-ui-components-toggle.ts"],"sourcesContent":["import {\n Component,\n EventEmitter,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RegisterFn } from './toggle.model';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IKeyboardEvent } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n standalone: false\n})\nexport class ToggleComponent implements ControlValueAccessor, OnChanges, OnInit {\n /**\n * The `selected` property determines the current state of the toggle switch.\n *\n * @type {boolean}\n * @default false\n * @memberof ToggleComponent\n */\n @Input() selected = false;\n\n /**\n * The `disabled` property determines whether the toggle switch is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof ToggleComponent\n */\n @Input() disabled = false;\n\n /**\n * Toggle label\n *\n * @type {string}\n * @default ''\n * @memberof ToggleComponent\n */\n @Input() label = '';\n\n /**\n * Message\n *\n * @type {string}\n * @default ''\n * @memberof ToggleComponent\n */\n @Input() message = '';\n\n /**\n * Max width of the toggle container\n *\n * @type {number}\n * @memberof ToggleComponent\n */\n @HostBinding('style.--max-width')\n @Input()\n maxWidth: number | undefined;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ToggleComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * The `toggle` event is triggered when the state of the toggle switch changes. It returns the new state.\n *\n * @type {event}\n * @memberof ToggleComponent\n */\n @Output() toggle = new EventEmitter<boolean>();\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof ToggleComponent\n */\n @Input() ariaLabel: string;\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 {boolean}\n * @memberof ToggleComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * disable/enable click on toggle\n * @type {boolean}\n * @memberof ToggleComponent\n */\n @Input() preventClick = false;\n\n /**\n * The loading state\n *\n * @type {boolean}\n * @memberof ToggleComponent\n */\n @Input() loading = 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 ToggleComponent\n */\n @Input() ariaDescribedby = '';\n\n protected showLabelTooltip = false\n protected classes: string;\n\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 ngOnChanges(): void {\n this.setClasses();\n }\n\n ngOnInit(): void {\n this.setClasses();\n }\n\n onToggle(): void {\n if (this.preventClick) {\n this.toggle.emit(this.selected);\n }\n if (!this.disabled && !this.preventClick) {\n this.selected = !this.selected;\n this.toggle.emit(this.selected);\n this.onChange(this.selected);\n }\n }\n\n writeValue(state: boolean): void {\n if (state) {\n this.selected = state;\n }\n }\n\n registerOnChange(fn: RegisterFn): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: RegisterFn): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n changeTextState(state: boolean): void {\n this.showLabelTooltip = state;\n }\n\n onKeydown($event: KeyboardEvent) {\n if ($event.key === IKeyboardEvent.ENTER || $event.key === IKeyboardEvent.SPACE) {\n $event.stopPropagation();\n $event.preventDefault();\n this.onToggle();\n }\n }\n\n private onChange: RegisterFn = () => {\n };\n private onTouched: RegisterFn = () => {\n };\n\n private setClasses(): void {\n this.classes = `${this.disabled ? 'disabled' : ''} ${this.applicationTheme} ${this.loading ? 'loading' : ''} ${!this.label ? 'small-toggle' : ''}`;\n }\n}\n","<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n [tabIndex]=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ 'active': selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n <div class=\"knob\" *ngIf=\"!loading; else loadingTemplate\" [ngClass]=\"{ selected }\">\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" *ngIf=\"selected && !label\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n </div>\n\n <ng-template #loadingTemplate>\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n </ng-template>\n </div>\n <div *ngIf=\"message && selected\" class=\"message\">{{ message }}</div>\n</div>\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ToggleComponent } from './toggle.component';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\n\n@NgModule({\n declarations: [ToggleComponent],\n imports: [CommonModule, MatTooltipModule, EllipseTextDirective, MatInputModule, UiTranslatePipe, IconComponentModule, SpinnerComponentModule],\n exports: [ToggleComponent],\n})\nexport class ToggleComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA8Ba,eAAe,CAAA;AA0G1B,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAA,CAAA,eAAe,GAAf,eAAe;AA1G5F;;;;;;AAMG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;;AAMG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;;AAMG;QACM,IAAA,CAAA,KAAK,GAAG,EAAE;AAEnB;;;;;;AAMG;QACM,IAAA,CAAA,OAAO,GAAG,EAAE;AAYrB;;;;;;AAMG;QACM,IAAA,CAAA,gBAAgB,GAAqB,OAAO;AAErD;;;;;AAKG;AACO,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAW;AAU9C;;;;;AAKG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK;AAE7B;;;;AAIG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK;AAE7B;;;;;AAKG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK;AAExB;;;;;AAKG;QACM,IAAA,CAAA,eAAe,GAAG,EAAE;QAEnB,IAAA,CAAA,gBAAgB,GAAG,KAAK;QA4D1B,IAAA,CAAA,QAAQ,GAAe,MAAK;AACpC,QAAA,CAAC;QACO,IAAA,CAAA,SAAS,GAAe,MAAK;AACrC,QAAA,CAAC;QAzDC,IAAI,eAAe,EAAE;AACnB,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;QACzC;IACF;IAEA,WAAW,GAAA;QACT,IAAI,CAAC,UAAU,EAAE;IACnB;IAEA,QAAQ,GAAA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A,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,iBAJjB,eAAe,CAAA,EAAA,OAAA,EAAA,CACpB,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,sBAAsB,aAClI,eAAe,CAAA,EAAA,CAAA,CAAA;gHAEd,qBAAqB,EAAA,OAAA,EAAA,CAHtB,YAAY,EAAE,gBAAgB,EAAwB,cAAc,EAAmB,mBAAmB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;;4FAGjI,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,sBAAsB,CAAC;oBAC7I,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-toggle.mjs","sources":["../../../components/toggle/toggle.component.ts","../../../components/toggle/toggle.component.html","../../../components/toggle/toggle.component.module.ts","../../../components/toggle/testgorilla-tgo-ui-components-toggle.ts"],"sourcesContent":["import {\n Component,\n EventEmitter,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RegisterFn } from './toggle.model';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IKeyboardEvent } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n standalone: false,\n})\nexport class ToggleComponent implements ControlValueAccessor, OnChanges, OnInit {\n /**\n * The `selected` property determines the current state of the toggle switch.\n *\n * @type {boolean}\n * @default false\n * @memberof ToggleComponent\n */\n @Input() selected = false;\n\n /**\n * The `disabled` property determines whether the toggle switch is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof ToggleComponent\n */\n @Input() disabled = false;\n\n /**\n * Toggle label\n *\n * @type {string}\n * @default ''\n * @memberof ToggleComponent\n */\n @Input() label = '';\n\n /**\n * Message\n *\n * @type {string}\n * @default ''\n * @memberof ToggleComponent\n */\n @Input() message = '';\n\n /**\n * Max width of the toggle container\n *\n * @type {number}\n * @memberof ToggleComponent\n */\n @HostBinding('style.--max-width')\n @Input()\n maxWidth: number | undefined;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ToggleComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * The `toggle` event is triggered when the state of the toggle switch changes. It returns the new state.\n *\n * @type {event}\n * @memberof ToggleComponent\n */\n @Output() toggle = new EventEmitter<boolean>();\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof ToggleComponent\n */\n @Input() ariaLabel: string;\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 {boolean}\n * @memberof ToggleComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * disable/enable click on toggle\n * @type {boolean}\n * @memberof ToggleComponent\n */\n @Input() preventClick = false;\n\n /**\n * The loading state\n *\n * @type {boolean}\n * @memberof ToggleComponent\n */\n @Input() loading = 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 ToggleComponent\n */\n @Input() ariaDescribedby = '';\n\n protected showLabelTooltip = false;\n protected classes: string;\n\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 ngOnChanges(): void {\n this.setClasses();\n }\n\n ngOnInit(): void {\n this.setClasses();\n }\n\n onToggle(): void {\n if (this.preventClick) {\n this.toggle.emit(this.selected);\n }\n if (!this.disabled && !this.preventClick) {\n this.selected = !this.selected;\n this.toggle.emit(this.selected);\n this.onChange(this.selected);\n }\n }\n\n writeValue(state: boolean): void {\n if (state) {\n this.selected = state;\n }\n }\n\n registerOnChange(fn: RegisterFn): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: RegisterFn): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n changeTextState(state: boolean): void {\n this.showLabelTooltip = state;\n }\n\n onKeydown($event: KeyboardEvent) {\n if ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string)) {\n $event.stopPropagation();\n $event.preventDefault();\n this.onToggle();\n }\n }\n\n private onChange: RegisterFn = () => {};\n private onTouched: RegisterFn = () => {};\n\n private setClasses(): void {\n this.classes = `${this.disabled ? 'disabled' : ''} ${this.applicationTheme} ${this.loading ? 'loading' : ''} ${!this.label ? 'small-toggle' : ''}`;\n }\n}\n","<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n <div class=\"knob\" *ngIf=\"!loading; else loadingTemplate\" [ngClass]=\"{ selected }\">\n <ui-icon\n [color]=\"disabled ? 'grey' : 'white'\"\n *ngIf=\"selected && !label\"\n [size]=\"'16'\"\n [name]=\"'Check-round-filled'\"\n ></ui-icon>\n </div>\n\n <ng-template #loadingTemplate>\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n </ng-template>\n </div>\n <div *ngIf=\"message && selected\" class=\"message\">{{ message }}</div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ToggleComponent } from './toggle.component';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\n\n@NgModule({\n declarations: [ToggleComponent],\n imports: [\n CommonModule,\n MatTooltipModule,\n EllipseTextDirective,\n MatInputModule,\n UiTranslatePipe,\n IconComponentModule,\n SpinnerComponentModule,\n ],\n exports: [ToggleComponent],\n})\nexport class ToggleComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA8Ba,eAAe,CAAA;AA0G1B,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAA,CAAA,eAAe,GAAf,eAAe;AA1G5F;;;;;;AAMG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;;AAMG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;;AAMG;QACM,IAAA,CAAA,KAAK,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AgB;wBAChB,oBAAoB;wBACpB,cAAc;wBACd,eAAe;wBACf,mBAAmB;wBACnB,sBAAsB;AACvB,qBAAA;oBACD,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -31,7 +31,10 @@ class TooltipTemplateDirective {
31
31
  this.tooltipPosition = TooltipPositionType.RIGHT;
32
32
  this.showTooltip = true;
33
33
  if (this._elementRef.nativeElement) {
34
- this.focusMonitor.monitor(this._elementRef.nativeElement).pipe(takeUntilDestroyed()).subscribe(origin => this.ngZone.run(() => {
34
+ this.focusMonitor
35
+ .monitor(this._elementRef.nativeElement)
36
+ .pipe(takeUntilDestroyed())
37
+ .subscribe(origin => this.ngZone.run(() => {
35
38
  if (origin === 'keyboard') {
36
39
  this.show();
37
40
  }
@@ -74,7 +77,7 @@ class TooltipTemplateDirective {
74
77
  overlayY: 'bottom',
75
78
  offsetX: 0,
76
79
  offsetY: -8,
77
- panelClass: TooltipPositionType.TOP
80
+ panelClass: TooltipPositionType.TOP,
78
81
  },
79
82
  [TooltipPositionType.BOTTOM]: {
80
83
  originX: 'center',
@@ -83,7 +86,7 @@ class TooltipTemplateDirective {
83
86
  overlayY: 'top',
84
87
  offsetX: 0,
85
88
  offsetY: 8,
86
- panelClass: TooltipPositionType.BOTTOM
89
+ panelClass: TooltipPositionType.BOTTOM,
87
90
  },
88
91
  [TooltipPositionType.LEFT]: {
89
92
  originX: 'start',
@@ -92,7 +95,7 @@ class TooltipTemplateDirective {
92
95
  overlayY: 'center',
93
96
  offsetX: -8,
94
97
  offsetY: 0,
95
- panelClass: TooltipPositionType.LEFT
98
+ panelClass: TooltipPositionType.LEFT,
96
99
  },
97
100
  [TooltipPositionType.RIGHT]: {
98
101
  originX: 'end',
@@ -101,14 +104,14 @@ class TooltipTemplateDirective {
101
104
  overlayY: 'center',
102
105
  offsetX: 8,
103
106
  offsetY: 0,
104
- panelClass: TooltipPositionType.RIGHT
105
- }
107
+ panelClass: TooltipPositionType.RIGHT,
108
+ },
106
109
  };
107
110
  const fallbackPositions = {
108
111
  [TooltipPositionType.TOP]: positions[TooltipPositionType.BOTTOM],
109
112
  [TooltipPositionType.BOTTOM]: positions[TooltipPositionType.TOP],
110
113
  [TooltipPositionType.LEFT]: positions[TooltipPositionType.RIGHT],
111
- [TooltipPositionType.RIGHT]: positions[TooltipPositionType.BOTTOM]
114
+ [TooltipPositionType.RIGHT]: positions[TooltipPositionType.BOTTOM],
112
115
  };
113
116
  const positionConfig = positions[position];
114
117
  const fallbackPositionConfig = fallbackPositions[position];
@@ -218,11 +221,11 @@ class TooltipComponent {
218
221
  }
219
222
  }
220
223
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
221
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: TooltipComponent, isStandalone: false, selector: "ui-tooltip", inputs: { position: "position", disabled: ["disabled", "disabled", booleanAttribute], message: "message", applicationTheme: "applicationTheme", labelForDefinition: "labelForDefinition", definitionTooltipSize: "definitionTooltipSize", variant: "variant" }, ngImport: i0, template: "@if (variant === 'definition') {\n <div\n [tabindex]=\"0\"\n class=\"definition-tooltip\"\n [attr.aria-label]=\"labelForDefinition + ', ' + ('TOOLTIP.DETAILS' | uiTranslate | async) + ':' + message\"\n style=\"position: relative;\"\n [tooltipPosition]=\"position\"\n [uiTooltipTemplate]=\"dif\"\n >\n <span\n class=\"label-definition-outside\"\n [ngClass]=\"'tooltip-size-' + definitionTooltipSize\"\n uiEllipseText\n (onChangeTextState)=\"isLabelEllipse = $event\"\n >\n {{ labelForDefinition }}\n </span>\n </div>\n\n <ng-template #dif>\n <div [attr.aria-label]=\"labelForDefinition + ' ' + message\"></div>\n <div class=\"label-definition-inner\" *ngIf=\"isLabelEllipse\">\n {{ labelForDefinition }}\n </div>\n <div class=\"text-definition\">\n {{ message }}\n </div>\n </ng-template>\n\n} @else {\n <div\n [matTooltip]=\"message\"\n [matTooltipDisabled]=\"disabled\"\n [matTooltipPosition]=\"matPosition\"\n [matTooltipClass]=\"applicationTheme\"\n [attr.aria-label]=\"message\"\n tabindex=\"0\"\n style=\"position: relative;\"\n >\n <div\n style=\"position: absolute; left: -9999px\"\n [attr.aria-live]=\"'polite'\"\n >{{ message }}\n </div>\n <ng-content></ng-content>\n @if (templateRef) {\n <div [class]=\"'template-tooltip'\">\n <ng-container *ngTemplateOutlet=\"templateRef\"></ng-container>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TooltipTemplateDirective, selector: "[uiTooltipTemplate]", inputs: ["tooltipPosition", "showTooltip", "uiTooltipTemplate"] }, { kind: "directive", type: i4.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
224
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: TooltipComponent, isStandalone: false, selector: "ui-tooltip", inputs: { position: "position", disabled: ["disabled", "disabled", booleanAttribute], message: "message", applicationTheme: "applicationTheme", labelForDefinition: "labelForDefinition", definitionTooltipSize: "definitionTooltipSize", variant: "variant" }, ngImport: i0, template: "@if (variant === 'definition') {\n <div\n [tabindex]=\"0\"\n class=\"definition-tooltip\"\n [attr.aria-label]=\"labelForDefinition + ', ' + ('TOOLTIP.DETAILS' | uiTranslate | async) + ':' + message\"\n style=\"position: relative\"\n [tooltipPosition]=\"position\"\n [uiTooltipTemplate]=\"dif\"\n >\n <span\n class=\"label-definition-outside\"\n [ngClass]=\"'tooltip-size-' + definitionTooltipSize\"\n uiEllipseText\n (onChangeTextState)=\"isLabelEllipse = $event\"\n >\n {{ labelForDefinition }}\n </span>\n </div>\n\n <ng-template #dif>\n <div [attr.aria-label]=\"labelForDefinition + ' ' + message\"></div>\n <div class=\"label-definition-inner\" *ngIf=\"isLabelEllipse\">\n {{ labelForDefinition }}\n </div>\n <div class=\"text-definition\">\n {{ message }}\n </div>\n </ng-template>\n} @else {\n <div\n [matTooltip]=\"message\"\n [matTooltipDisabled]=\"disabled\"\n [matTooltipPosition]=\"matPosition\"\n [matTooltipClass]=\"applicationTheme\"\n [attr.aria-label]=\"message\"\n tabindex=\"0\"\n style=\"position: relative\"\n >\n <div style=\"position: absolute; left: -9999px\" [attr.aria-live]=\"'polite'\">{{ message }}</div>\n <ng-content></ng-content>\n @if (templateRef) {\n <div [class]=\"'template-tooltip'\">\n <ng-container *ngTemplateOutlet=\"templateRef\"></ng-container>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TooltipTemplateDirective, selector: "[uiTooltipTemplate]", inputs: ["tooltipPosition", "showTooltip", "uiTooltipTemplate"] }, { kind: "directive", type: i4.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
222
225
  }
223
226
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponent, decorators: [{
224
227
  type: Component,
225
- args: [{ selector: 'ui-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (variant === 'definition') {\n <div\n [tabindex]=\"0\"\n class=\"definition-tooltip\"\n [attr.aria-label]=\"labelForDefinition + ', ' + ('TOOLTIP.DETAILS' | uiTranslate | async) + ':' + message\"\n style=\"position: relative;\"\n [tooltipPosition]=\"position\"\n [uiTooltipTemplate]=\"dif\"\n >\n <span\n class=\"label-definition-outside\"\n [ngClass]=\"'tooltip-size-' + definitionTooltipSize\"\n uiEllipseText\n (onChangeTextState)=\"isLabelEllipse = $event\"\n >\n {{ labelForDefinition }}\n </span>\n </div>\n\n <ng-template #dif>\n <div [attr.aria-label]=\"labelForDefinition + ' ' + message\"></div>\n <div class=\"label-definition-inner\" *ngIf=\"isLabelEllipse\">\n {{ labelForDefinition }}\n </div>\n <div class=\"text-definition\">\n {{ message }}\n </div>\n </ng-template>\n\n} @else {\n <div\n [matTooltip]=\"message\"\n [matTooltipDisabled]=\"disabled\"\n [matTooltipPosition]=\"matPosition\"\n [matTooltipClass]=\"applicationTheme\"\n [attr.aria-label]=\"message\"\n tabindex=\"0\"\n style=\"position: relative;\"\n >\n <div\n style=\"position: absolute; left: -9999px\"\n [attr.aria-live]=\"'polite'\"\n >{{ message }}\n </div>\n <ng-content></ng-content>\n @if (templateRef) {\n <div [class]=\"'template-tooltip'\">\n <ng-container *ngTemplateOutlet=\"templateRef\"></ng-container>\n </div>\n }\n </div>\n}\n" }]
228
+ args: [{ selector: 'ui-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (variant === 'definition') {\n <div\n [tabindex]=\"0\"\n class=\"definition-tooltip\"\n [attr.aria-label]=\"labelForDefinition + ', ' + ('TOOLTIP.DETAILS' | uiTranslate | async) + ':' + message\"\n style=\"position: relative\"\n [tooltipPosition]=\"position\"\n [uiTooltipTemplate]=\"dif\"\n >\n <span\n class=\"label-definition-outside\"\n [ngClass]=\"'tooltip-size-' + definitionTooltipSize\"\n uiEllipseText\n (onChangeTextState)=\"isLabelEllipse = $event\"\n >\n {{ labelForDefinition }}\n </span>\n </div>\n\n <ng-template #dif>\n <div [attr.aria-label]=\"labelForDefinition + ' ' + message\"></div>\n <div class=\"label-definition-inner\" *ngIf=\"isLabelEllipse\">\n {{ labelForDefinition }}\n </div>\n <div class=\"text-definition\">\n {{ message }}\n </div>\n </ng-template>\n} @else {\n <div\n [matTooltip]=\"message\"\n [matTooltipDisabled]=\"disabled\"\n [matTooltipPosition]=\"matPosition\"\n [matTooltipClass]=\"applicationTheme\"\n [attr.aria-label]=\"message\"\n tabindex=\"0\"\n style=\"position: relative\"\n >\n <div style=\"position: absolute; left: -9999px\" [attr.aria-live]=\"'polite'\">{{ message }}</div>\n <ng-content></ng-content>\n @if (templateRef) {\n <div [class]=\"'template-tooltip'\">\n <ng-container *ngTemplateOutlet=\"templateRef\"></ng-container>\n </div>\n }\n </div>\n}\n" }]
226
229
  }], ctorParameters: () => [{ type: undefined, decorators: [{
227
230
  type: Optional
228
231
  }, {
@@ -248,9 +251,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
248
251
  class TooltipComponentModule {
249
252
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
250
253
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponentModule, declarations: [TooltipComponent], imports: [MatTooltipModule, CommonModule, TooltipTemplateDirective, EllipseTextDirective, UiTranslatePipe], exports: [TooltipComponent, TooltipTemplateDirective] }); }
251
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponentModule, providers: [
252
- { provide: 'TooltipComponentToken', useValue: TooltipComponent }
253
- ], imports: [MatTooltipModule, CommonModule] }); }
254
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponentModule, providers: [{ provide: 'TooltipComponentToken', useValue: TooltipComponent }], imports: [MatTooltipModule, CommonModule] }); }
254
255
  }
255
256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TooltipComponentModule, decorators: [{
256
257
  type: NgModule,
@@ -258,9 +259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
258
259
  declarations: [TooltipComponent],
259
260
  imports: [MatTooltipModule, CommonModule, TooltipTemplateDirective, EllipseTextDirective, UiTranslatePipe],
260
261
  exports: [TooltipComponent, TooltipTemplateDirective],
261
- providers: [
262
- { provide: 'TooltipComponentToken', useValue: TooltipComponent }
263
- ]
262
+ providers: [{ provide: 'TooltipComponentToken', useValue: TooltipComponent }],
264
263
  }]
265
264
  }] });
266
265