@testgorilla/tgo-ui 7.3.0 → 7.4.1

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 (40) hide show
  1. package/components/autocomplete-v2/autocomplete-overflow-detect.directive.d.ts +21 -0
  2. package/components/autocomplete-v2/autocomplete-v2-filter.service.d.ts +24 -0
  3. package/components/autocomplete-v2/autocomplete-v2-utils.d.ts +18 -0
  4. package/components/autocomplete-v2/autocomplete-v2-value-manager.d.ts +27 -0
  5. package/components/autocomplete-v2/autocomplete-v2.component.d.ts +119 -0
  6. package/components/autocomplete-v2/autocomplete-v2.model.d.ts +12 -0
  7. package/components/autocomplete-v2/index.d.ts +5 -0
  8. package/components/autocomplete-v2/infinite-scroll.directive.d.ts +21 -0
  9. package/components/autocomplete-v2/public-api.d.ts +7 -0
  10. package/components/core/directives/index.d.ts +2 -0
  11. package/components/core/directives/prevent-input.directive.d.ts +7 -0
  12. package/components/core/directives/select-text.directive.d.ts +10 -0
  13. package/components/core/pipes/includes.pipe.d.ts +7 -0
  14. package/components/core/pipes/index.d.ts +2 -0
  15. package/components/core/pipes/transform-item.pipe.d.ts +8 -0
  16. package/components/core/public-api.d.ts +2 -1
  17. package/components/validation-error/validation-error.component.d.ts +5 -1
  18. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +805 -0
  19. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -0
  20. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  22. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  24. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +123 -28
  25. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  26. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  28. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  30. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  32. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  34. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  36. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +21 -3
  37. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  38. package/mcp/catalog.json +1 -1
  39. package/package.json +21 -17
  40. package/components/core/select-text.directive.d.ts +0 -19
@@ -265,7 +265,7 @@ class CheckboxComponent {
265
265
  this.checkboxElement.focus();
266
266
  }
267
267
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CheckboxComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: i0.ChangeDetectorRef }, { token: i1.NgControl, optional: true, self: true }, { token: i2.FocusMonitor }, { token: i0.NgZone }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
268
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: CheckboxComponent, isStandalone: false, selector: "ui-checkbox", inputs: { disabled: "disabled", checked: "checked", indeterminate: "indeterminate", companyColor: "companyColor", name: "name", label: "label", multiple: "multiple", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", hasError: "hasError", hideBuiltInErrors: "hideBuiltInErrors", hideLabelInErrors: "hideLabelInErrors", ariaLabelledby: "ariaLabelledby", ariaDescribedby: "ariaDescribedby", truncateText: "truncateText", alignment: "alignment", tabIndex: "tabIndex" }, outputs: { changed: "changed" }, host: { listeners: { "focus": "checkboxElement.focus()" }, properties: { "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.aria-required": "null", "style.--color": "this.companyColor" } }, viewQueries: [{ propertyName: "tooltipElement", first: true, predicate: ["tooltip"], descendants: true }, { propertyName: "checkboxElement", first: true, predicate: ["checkbox"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #checkboxContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'checkbox-container' : 'checkbox'\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"toggleChecked(); checkboxContainer.focus()\"\n (keydown.space)=\"toggleChecked(); checkboxContainer.focus()\"\n>\n <mat-checkbox\n #checkbox\n (mouseleave)=\"checkbox.disableRipple = true\"\n (mouseenter)=\"checkbox.disableRipple = false\"\n [indeterminate]=\"indeterminate\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [name]=\"name\"\n [ngClass]=\"[checkbox.disableRipple ? 'disable-ripple' : '', origin ? 'cdk-' + origin + '-focused' : '']\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby || 'ariaDescribedby'\"\n (click)=\"toggleChecked()\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n class=\"checkbox\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip && truncateText ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >\n {{ label }}\n </span>\n }\n <ng-content select=\"[checkbox-label]\"></ng-content>\n </mat-checkbox>\n\n <mat-hint class=\"error\" *ngIf=\"ngControl?.errors | hasValidationError\">\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n </mat-hint>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.mat-mdc-checkbox.checkbox.mat-accent ::ng-deep .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-checked .mdc-checkbox__background{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-checked .mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff!important}.mat-mdc-checkbox.checkbox.mat-accent ::ng-deep .mdc-checkbox__ripple{background-color:var(--color)}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mdc-checkbox__native-control:indeterminate~.mat-mdc-checkbox-disabled .mdc-checkbox__background{background-color:#888}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-checked.mat-mdc-checkbox-disabled .mdc-checkbox__background{background-color:#888;--color: $tgo-dark !important}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox{opacity:.5}.checkbox,.checkbox-container{--border-width-default-state: 4px;--border-width-animation-state: 6px;width:100%}.checkbox[alignment=top] ::ng-deep .mdc-form-field,.checkbox-container[alignment=top] ::ng-deep .mdc-form-field{align-items:start}.checkbox[alignment=top] .label,.checkbox-container[alignment=top] .label{margin-top:10px}.checkbox[truncate-text=true] .label,.checkbox[truncate-text=true] ::ng-deep label,.checkbox-container[truncate-text=true] .label,.checkbox-container[truncate-text=true] ::ng-deep label{-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes focus-ring-animation{0%{outline-width:var(--border-width-animation-state)}to{outline-width:var(--border-width-default-state)}}.checkbox .cdk-keyboard-focused,.checkbox-container .cdk-keyboard-focused{outline:none}.checkbox .cdk-keyboard-focused ::ng-deep .mdc-checkbox__ripple,.checkbox-container .cdk-keyboard-focused ::ng-deep .mdc-checkbox__ripple{display:none}.checkbox .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background,.checkbox-container .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background{outline:3px solid #242424;animation:focus-ring-animation .4s forwards}.checkbox .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background:after,.checkbox-container .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:4px}.checkbox[hasError=true],.checkbox-container[hasError=true]{--border-width-default-state: 6px;--border-width-animation-state: 8px}.checkbox[hasError=true]:focus-visible ::ng-deep .mdc-checkbox__background:after,.checkbox-container[hasError=true]:focus-visible ::ng-deep .mdc-checkbox__background:after{width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px}[theme=dark],[theme=light],.dark,.light{--mdc-checkbox-unselected-icon-color: #242424 !important}[theme=dark] .mat-mdc-checkbox,[theme=light] .mat-mdc-checkbox,.dark .mat-mdc-checkbox,.light .mat-mdc-checkbox{width:100%}[theme=dark] .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple,[theme=light] .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple,.dark .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple,.light .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple{display:none}[theme=dark] ::ng-deep .mdc-form-field,[theme=light] ::ng-deep .mdc-form-field,.dark ::ng-deep .mdc-form-field,.light ::ng-deep .mdc-form-field{width:100%}[theme=dark] ::ng-deep .mdc-checkbox__background,[theme=light] ::ng-deep .mdc-checkbox__background,.dark ::ng-deep .mdc-checkbox__background,.light ::ng-deep .mdc-checkbox__background{border-radius:4px;transform:scale(.9);background:#fff!important;border-width:1px}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox{opacity:1!important}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background{background-color:#e9e9e9!important;border-color:#919191!important}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#919191;width:8px}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg{color:#919191!important}[theme=dark] ::ng-deep .mdc-checkbox__checkmark,[theme=light] ::ng-deep .mdc-checkbox__checkmark,.dark ::ng-deep .mdc-checkbox__checkmark,.light ::ng-deep .mdc-checkbox__checkmark{width:12px;height:12px;left:calc(50% - 6px);top:calc(50% - 6px)}[theme=dark] ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark,[theme=light] ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark,.dark ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark,.light ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{width:12px}::ng-deep .mdc-checkbox__ripple{background:var(--color)!important}::ng-deep .mat-mdc-checkbox .mdc-form-field .mdc-label{padding-left:0}.multiple-checked{border:1px solid var(--color);display:flex;flex-direction:row;align-items:center;gap:16px;background:var(--color);border-radius:8px}.multiple-checked ::ng-deep .mat-mdc-checkbox{width:100%;height:100%}.multiple-checked ::ng-deep .mdc-form-field{padding:8px;width:100%;height:100%;align-items:center}.multiple-checked[theme=classic] .mat-mdc-checkbox.checkbox.mat-accent ::ng-deep .mdc-checkbox__background{border:1px solid #ffffff!important;border-color:#fff!important}.multiple-checked ::ng-deep label{color:#fff}.multiple-checked[theme=dark][hasError=false],.multiple-checked[theme=light][hasError=false]{background:#f4f4f4;border-radius:10px;border-color:#242424;outline:1px solid #242424}.multiple-checked[theme=dark][hasError=false] ::ng-deep label,.multiple-checked[theme=light][hasError=false] ::ng-deep label{color:#242424}.multiple-checked[theme=dark][hasError=true],.multiple-checked[theme=light][hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff;border-radius:10px}.multiple-checked[theme=dark][hasError=true] ::ng-deep label,.multiple-checked[theme=light][hasError=true] ::ng-deep label{color:#242424}.multiple-unchecked{border:1px solid #e0e0e0;display:flex;flex-direction:row;align-items:center;gap:16px;background:#fff;border-radius:8px}.multiple-unchecked ::ng-deep .mat-mdc-checkbox{width:100%;height:100%}.multiple-unchecked ::ng-deep .mdc-form-field{padding:8px;width:100%;height:100%;align-items:center}.multiple-unchecked:hover{background:#f6f6f6;border:1px solid #e0e0e0}.multiple-unchecked ::ng-deep .mdc-checkbox__background{border:1px solid #000000}.multiple-unchecked ::ng-deep .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:0!important}.multiple-unchecked[theme=dark][hasError=false],.multiple-unchecked[theme=light][hasError=false]{border:1px solid #919191;background:#fff;border-radius:10px}.multiple-unchecked[theme=dark][hasError=false] ::ng-deep .mdc-checkbox__background,.multiple-unchecked[theme=light][hasError=false] ::ng-deep .mdc-checkbox__background{border:1px solid #242424!important}.multiple-unchecked[theme=dark][hasError=false]:hover,.multiple-unchecked[theme=light][hasError=false]:hover{outline:1px solid #242424;border-color:#242424!important}.multiple-unchecked[hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff}.multiple-unchecked[hasError=true] ::ng-deep .mdc-checkbox__background{border-color:#e02800}.multiple-unchecked[hasError=true]:not([theme=classic]){border-radius:10px}*[hasError=true]{--mdc-checkbox-unselected-icon-color: #e02800 !important;--mdc-checkbox-unselected-hover-icon-color: #e02800 !important;--mdc-checkbox-unselected-focus-icon-color: #e02800 !important}*[hasError=true] ::ng-deep .mdc-checkbox__background{border-width:2px!important}.checkbox-container{cursor:pointer}.checkbox-container .label{-webkit-user-select:none;user-select:none}.checkbox .label{display:block;width:100%;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i6.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme"] }, { kind: "directive", type: i7.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i7.HasValidationErrorPipe, name: "hasValidationError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: CheckboxComponent, isStandalone: false, selector: "ui-checkbox", inputs: { disabled: "disabled", checked: "checked", indeterminate: "indeterminate", companyColor: "companyColor", name: "name", label: "label", multiple: "multiple", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", hasError: "hasError", hideBuiltInErrors: "hideBuiltInErrors", hideLabelInErrors: "hideLabelInErrors", ariaLabelledby: "ariaLabelledby", ariaDescribedby: "ariaDescribedby", truncateText: "truncateText", alignment: "alignment", tabIndex: "tabIndex" }, outputs: { changed: "changed" }, host: { listeners: { "focus": "checkboxElement.focus()" }, properties: { "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.aria-required": "null", "style.--color": "this.companyColor" } }, viewQueries: [{ propertyName: "tooltipElement", first: true, predicate: ["tooltip"], descendants: true }, { propertyName: "checkboxElement", first: true, predicate: ["checkbox"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #checkboxContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'checkbox-container' : 'checkbox'\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"toggleChecked(); checkboxContainer.focus()\"\n (keydown.space)=\"toggleChecked(); checkboxContainer.focus()\"\n>\n <mat-checkbox\n #checkbox\n (mouseleave)=\"checkbox.disableRipple = true\"\n (mouseenter)=\"checkbox.disableRipple = false\"\n [indeterminate]=\"indeterminate\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [name]=\"name\"\n [ngClass]=\"[checkbox.disableRipple ? 'disable-ripple' : '', origin ? 'cdk-' + origin + '-focused' : '']\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby || 'ariaDescribedby'\"\n (click)=\"toggleChecked()\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n class=\"checkbox\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip && truncateText ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >\n {{ label }}\n </span>\n }\n <ng-content select=\"[checkbox-label]\"></ng-content>\n </mat-checkbox>\n\n <mat-hint class=\"error\" *ngIf=\"ngControl?.errors | hasValidationError\">\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n </mat-hint>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.mat-mdc-checkbox.checkbox.mat-accent ::ng-deep .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-checked .mdc-checkbox__background{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-checked .mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff!important}.mat-mdc-checkbox.checkbox.mat-accent ::ng-deep .mdc-checkbox__ripple{background-color:var(--color)}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mdc-checkbox__native-control:indeterminate~.mat-mdc-checkbox-disabled .mdc-checkbox__background{background-color:#888}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-checked.mat-mdc-checkbox-disabled .mdc-checkbox__background{background-color:#888;--color: $tgo-dark !important}::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox{opacity:.5}.checkbox,.checkbox-container{--border-width-default-state: 4px;--border-width-animation-state: 6px;width:100%}.checkbox[alignment=top] ::ng-deep .mdc-form-field,.checkbox-container[alignment=top] ::ng-deep .mdc-form-field{align-items:start}.checkbox[alignment=top] .label,.checkbox-container[alignment=top] .label{margin-top:10px}.checkbox[truncate-text=true] .label,.checkbox[truncate-text=true] ::ng-deep label,.checkbox-container[truncate-text=true] .label,.checkbox-container[truncate-text=true] ::ng-deep label{-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes focus-ring-animation{0%{outline-width:var(--border-width-animation-state)}to{outline-width:var(--border-width-default-state)}}.checkbox .cdk-keyboard-focused,.checkbox-container .cdk-keyboard-focused{outline:none}.checkbox .cdk-keyboard-focused ::ng-deep .mdc-checkbox__ripple,.checkbox-container .cdk-keyboard-focused ::ng-deep .mdc-checkbox__ripple{display:none}.checkbox .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background,.checkbox-container .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background{outline:3px solid #242424;animation:focus-ring-animation .4s forwards}.checkbox .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background:after,.checkbox-container .cdk-keyboard-focused ::ng-deep .mdc-checkbox__background:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:4px}.checkbox[hasError=true],.checkbox-container[hasError=true]{--border-width-default-state: 6px;--border-width-animation-state: 8px}.checkbox[hasError=true]:focus-visible ::ng-deep .mdc-checkbox__background:after,.checkbox-container[hasError=true]:focus-visible ::ng-deep .mdc-checkbox__background:after{width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px}[theme=dark],[theme=light],.dark,.light{--mdc-checkbox-unselected-icon-color: #242424 !important}[theme=dark] .mat-mdc-checkbox,[theme=light] .mat-mdc-checkbox,.dark .mat-mdc-checkbox,.light .mat-mdc-checkbox{width:100%}[theme=dark] .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple,[theme=light] .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple,.dark .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple,.light .mat-mdc-checkbox.disable-ripple ::ng-deep .mdc-checkbox__ripple{display:none}[theme=dark] ::ng-deep .mdc-form-field,[theme=light] ::ng-deep .mdc-form-field,.dark ::ng-deep .mdc-form-field,.light ::ng-deep .mdc-form-field{width:100%}[theme=dark] ::ng-deep .mdc-checkbox__background,[theme=light] ::ng-deep .mdc-checkbox__background,.dark ::ng-deep .mdc-checkbox__background,.light ::ng-deep .mdc-checkbox__background{border-radius:4px;transform:scale(.9);background:#fff!important;border-width:1px}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-form-field .mdc-checkbox{opacity:1!important}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background{background-color:#e9e9e9!important;border-color:#919191!important}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#919191;width:8px}[theme=dark] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg,[theme=light] ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg,.dark ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg,.light ::ng-deep .mat-mdc-checkbox.checkbox.mat-accent.mat-mdc-checkbox-disabled .mdc-checkbox__background svg{color:#919191!important}[theme=dark] ::ng-deep .mdc-checkbox__checkmark,[theme=light] ::ng-deep .mdc-checkbox__checkmark,.dark ::ng-deep .mdc-checkbox__checkmark,.light ::ng-deep .mdc-checkbox__checkmark{width:12px;height:12px;left:calc(50% - 6px);top:calc(50% - 6px)}[theme=dark] ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark,[theme=light] ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark,.dark ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark,.light ::ng-deep .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{width:12px}::ng-deep .mdc-checkbox__ripple{background:var(--color)!important}::ng-deep .mat-mdc-checkbox .mdc-form-field .mdc-label{padding-left:0}.multiple-checked{border:1px solid var(--color);display:flex;flex-direction:row;align-items:center;gap:16px;background:var(--color);border-radius:8px}.multiple-checked ::ng-deep .mat-mdc-checkbox{width:100%;height:100%}.multiple-checked ::ng-deep .mdc-form-field{padding:8px;width:100%;height:100%;align-items:center}.multiple-checked[theme=classic] .mat-mdc-checkbox.checkbox.mat-accent ::ng-deep .mdc-checkbox__background{border:1px solid #ffffff!important;border-color:#fff!important}.multiple-checked ::ng-deep label{color:#fff}.multiple-checked[theme=dark][hasError=false],.multiple-checked[theme=light][hasError=false]{background:#f4f4f4;border-radius:10px;border-color:#242424;outline:1px solid #242424}.multiple-checked[theme=dark][hasError=false] ::ng-deep label,.multiple-checked[theme=light][hasError=false] ::ng-deep label{color:#242424}.multiple-checked[theme=dark][hasError=true],.multiple-checked[theme=light][hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff;border-radius:10px}.multiple-checked[theme=dark][hasError=true] ::ng-deep label,.multiple-checked[theme=light][hasError=true] ::ng-deep label{color:#242424}.multiple-unchecked{border:1px solid #e0e0e0;display:flex;flex-direction:row;align-items:center;gap:16px;background:#fff;border-radius:8px}.multiple-unchecked ::ng-deep .mat-mdc-checkbox{width:100%;height:100%}.multiple-unchecked ::ng-deep .mdc-form-field{padding:8px;width:100%;height:100%;align-items:center}.multiple-unchecked:hover{background:#f6f6f6;border:1px solid #e0e0e0}.multiple-unchecked ::ng-deep .mdc-checkbox__background{border:1px solid #000000}.multiple-unchecked ::ng-deep .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:0!important}.multiple-unchecked[theme=dark][hasError=false],.multiple-unchecked[theme=light][hasError=false]{border:1px solid #919191;background:#fff;border-radius:10px}.multiple-unchecked[theme=dark][hasError=false] ::ng-deep .mdc-checkbox__background,.multiple-unchecked[theme=light][hasError=false] ::ng-deep .mdc-checkbox__background{border:1px solid #242424!important}.multiple-unchecked[theme=dark][hasError=false]:hover,.multiple-unchecked[theme=light][hasError=false]:hover{outline:1px solid #242424;border-color:#242424!important}.multiple-unchecked[hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff}.multiple-unchecked[hasError=true] ::ng-deep .mdc-checkbox__background{border-color:#e02800}.multiple-unchecked[hasError=true]:not([theme=classic]){border-radius:10px}*[hasError=true]{--mdc-checkbox-unselected-icon-color: #e02800 !important;--mdc-checkbox-unselected-hover-icon-color: #e02800 !important;--mdc-checkbox-unselected-focus-icon-color: #e02800 !important}*[hasError=true] ::ng-deep .mdc-checkbox__background{border-width:2px!important}.checkbox-container{cursor:pointer}.checkbox-container .label{-webkit-user-select:none;user-select:none}.checkbox .label{display:block;width:100%;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i6.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme", "customErrors"] }, { kind: "directive", type: i7.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i7.HasValidationErrorPipe, name: "hasValidationError" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
269
269
  }
270
270
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CheckboxComponent, decorators: [{
271
271
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-checkbox.mjs","sources":["../../../components/checkbox/checkbox.component.ts","../../../components/checkbox/checkbox.component.html","../../../components/checkbox/focus-visible.directive.ts","../../../components/checkbox/checkbox.component.module.ts","../../../components/checkbox/testgorilla-tgo-ui-components-checkbox.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n DoCheck,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Alignment } from '@testgorilla/tgo-ui/components/core';\nimport { FocusableOption, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'ui-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n host: {\n // Needs to be removed since it causes some a11y issues. (https://github.com/angular/components/issues/21266)\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.aria-required]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the mat-checkbox element.\n '(focus)': 'checkboxElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\n/* eslint-disable @angular-eslint/no-conflicting-lifecycle */\nexport class CheckboxComponent\n implements OnInit, FocusableOption, ControlValueAccessor, DoCheck, OnChanges, AfterViewInit, OnDestroy\n{\n /**\n * Determines whether the checkbox is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() disabled = false;\n\n /**\n * Determines whether the checkbox is checked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() checked = false;\n\n /**\n * Determines whether the checkbox is indeterminate.\n * It can be used to represent a checkbox with three states, e.g. a checkbox that represents a nested list of checkable items.\n * Default: false.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() indeterminate = false;\n\n /**\n * Determines whether the checkbox color.\n * Default: Test Gorilla primary color.\n *\n * @type {string}\n * @memberof CheckboxComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null;\n\n /**\n * Name value will be applied to the input element if present.\n *\n * @type {string}\n * @memberof CheckboxComponent\n */\n @Input() name = '';\n\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof CheckboxComponent\n */\n @Input() label = '';\n\n /**\n * Determines whether the checkbox is a multiple choice cell.\n * Default: false\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() multiple = false;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof CheckboxComponent\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 CheckboxComponent\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 CheckboxComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Defines if checkbox has error\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() hasError = false;\n\n /**\n * Hide in-build errors for Reactive Forms\n *\n * @type {number}\n * @memberof CheckboxComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof CheckboxComponent\n */\n @Input() hideLabelInErrors = 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 CheckboxComponent\n */\n @Input() ariaLabelledby = '';\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 CheckboxComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Truncate text if it is too long\n * @type {string}\n * @memberof CheckboxComponent\n */\n @Input() truncateText = false;\n\n /**\n * Text alignment\n * @type {'center' | 'top'}\n * @memberof CheckboxComponent\n */\n @Input() alignment: Alignment = 'center';\n\n /**\n * Sets the tab index for the checkbox component.\n * This determines the order in which elements receive focus when the user navigates through them using the Tab key.\n * Default value is 0.\n *\n * @type {number}\n * @memberof CheckboxComponent\n */\n @Input() tabIndex = 0;\n\n /**\n * Event emitted when the checkbox's checked value changes.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Output() changed = new EventEmitter<boolean>();\n\n /**\n * @ignore\n */\n onChange = (_: any) => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n showTooltip = false;\n classMultiple: string;\n\n @ViewChild('tooltip') tooltipElement: MatTooltip;\n @ViewChild('checkbox') checkboxElement: MatCheckbox;\n protected origin: string | null = null;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n private cdr: ChangeDetectorRef,\n @Optional() @Self() public ngControl: NgControl,\n private focusMonitor: FocusMonitor,\n private ngZone: NgZone,\n private destroyRef: DestroyRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnChanges(): void {\n this.setCompanyColor();\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.cdr.markForCheck();\n }\n }\n\n ngAfterViewInit(): void {\n const checkboxNativeInput = this.checkboxElement._inputElement.nativeElement;\n checkboxNativeInput.setAttribute('role', 'checkbox');\n checkboxNativeInput.setAttribute('aria-checked', (!!this.checked).toString());\n checkboxNativeInput.setAttribute('aria-disabled', (!!this.disabled).toString());\n checkboxNativeInput.setAttribute('aria-label', this.label);\n checkboxNativeInput.setAttribute('aria-required', this.ariaRequired.toString());\n this.focusMonitor\n .monitor(this.checkboxElement._inputElement.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin => this.ngZone.run(this.focusAction.bind(this, origin)));\n }\n\n focusAction(origin: FocusOrigin) {\n this.origin = origin;\n this.cdr.markForCheck();\n this.onFocus(origin === 'keyboard');\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.checkboxElement._inputElement.nativeElement);\n }\n\n emitChange(event: MatCheckboxChange): void {\n this.changed.emit(event.checked);\n }\n\n ngOnInit() {\n this.classMultiple = this.setClass();\n this.setCompanyColor();\n }\n\n toggleChecked(): void {\n this.checked = !this.checked;\n this.changed.emit(this.checked);\n this.onTouch();\n this.onChange(this.checked);\n if (!this.disabled) {\n this.indeterminate = false;\n this.classMultiple = this.setClass();\n }\n this.checkboxElement._inputElement.nativeElement.setAttribute('aria-checked', (!!this.checked).toString());\n this.checkboxElement._inputElement.nativeElement.setAttribute('aria-disabled', (!!this.disabled).toString());\n }\n\n setClass(): string {\n if (this.multiple) {\n return this.checked || this.indeterminate ? 'multiple-checked' : 'multiple-unchecked';\n }\n return '';\n }\n\n writeValue(value: boolean): void {\n this.checked = value;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onLabelEllipsisChange(isEllipsis: boolean): void {\n this.showTooltip = isEllipsis;\n }\n\n onFocus(isFocus: boolean): void {\n setTimeout(() => {\n if (this.tooltipElement) {\n if (isFocus && this.showTooltip) {\n this.tooltipElement.show();\n } else {\n this.tooltipElement.hide();\n }\n }\n }, 0);\n }\n\n private setCompanyColor(): void {\n this.companyColor = this.companyColor\n ? this.companyColor\n : this.applicationTheme === 'classic'\n ? '#46A997'\n : '#D410AA';\n }\n\n focus(): void {\n this.checkboxElement.focus();\n }\n}\n","<div\n #checkboxContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'checkbox-container' : 'checkbox'\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"toggleChecked(); checkboxContainer.focus()\"\n (keydown.space)=\"toggleChecked(); checkboxContainer.focus()\"\n>\n <mat-checkbox\n #checkbox\n (mouseleave)=\"checkbox.disableRipple = true\"\n (mouseenter)=\"checkbox.disableRipple = false\"\n [indeterminate]=\"indeterminate\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [name]=\"name\"\n [ngClass]=\"[checkbox.disableRipple ? 'disable-ripple' : '', origin ? 'cdk-' + origin + '-focused' : '']\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby || 'ariaDescribedby'\"\n (click)=\"toggleChecked()\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n class=\"checkbox\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip && truncateText ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >\n {{ label }}\n </span>\n }\n <ng-content select=\"[checkbox-label]\"></ng-content>\n </mat-checkbox>\n\n <mat-hint class=\"error\" *ngIf=\"ngControl?.errors | hasValidationError\">\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n </mat-hint>\n</div>\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\n\n@Directive({\n selector: '[uiFocusVisible]',\n standalone: true,\n})\nexport class FocusVisibleDirective {\n @Output() uiFocusVisible = new EventEmitter<boolean>();\n private hadKeyboardEvent = false;\n\n constructor() {}\n\n @HostListener('document:keydown', ['$event'])\n handleKeyboardEvent(): void {\n this.hadKeyboardEvent = true;\n }\n\n @HostListener('focus', ['$event'])\n onFocus(): void {\n if (this.hadKeyboardEvent) {\n this.uiFocusVisible.next(true);\n }\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.uiFocusVisible.next(false);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { CheckboxComponent } from './checkbox.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { FocusVisibleDirective } from './focus-visible.directive';\n\n@NgModule({\n declarations: [CheckboxComponent],\n imports: [\n CommonModule,\n MatCheckboxModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n IconComponentModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n EllipseTextDirective,\n MatTooltipModule,\n FocusVisibleDirective,\n ],\n exports: [CheckboxComponent],\n})\nexport class CheckboxComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA+CA;MACa,iBAAiB,CAAA;IAqL5B,WAAA,CA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Z,iBAAiB;wBACjB,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBACnB,eAAe;wBACf,qBAAqB;wBACrB,sBAAsB;wBACtB,oBAAoB;wBACpB,gBAAgB;wBAChB,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA;;;AC/BD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-checkbox.mjs","sources":["../../../components/checkbox/checkbox.component.ts","../../../components/checkbox/checkbox.component.html","../../../components/checkbox/focus-visible.directive.ts","../../../components/checkbox/checkbox.component.module.ts","../../../components/checkbox/testgorilla-tgo-ui-components-checkbox.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n DoCheck,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Alignment } from '@testgorilla/tgo-ui/components/core';\nimport { FocusableOption, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'ui-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n host: {\n // Needs to be removed since it causes some a11y issues. (https://github.com/angular/components/issues/21266)\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.aria-required]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the mat-checkbox element.\n '(focus)': 'checkboxElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\n/* eslint-disable @angular-eslint/no-conflicting-lifecycle */\nexport class CheckboxComponent\n implements OnInit, FocusableOption, ControlValueAccessor, DoCheck, OnChanges, AfterViewInit, OnDestroy\n{\n /**\n * Determines whether the checkbox is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() disabled = false;\n\n /**\n * Determines whether the checkbox is checked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() checked = false;\n\n /**\n * Determines whether the checkbox is indeterminate.\n * It can be used to represent a checkbox with three states, e.g. a checkbox that represents a nested list of checkable items.\n * Default: false.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() indeterminate = false;\n\n /**\n * Determines whether the checkbox color.\n * Default: Test Gorilla primary color.\n *\n * @type {string}\n * @memberof CheckboxComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null;\n\n /**\n * Name value will be applied to the input element if present.\n *\n * @type {string}\n * @memberof CheckboxComponent\n */\n @Input() name = '';\n\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof CheckboxComponent\n */\n @Input() label = '';\n\n /**\n * Determines whether the checkbox is a multiple choice cell.\n * Default: false\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() multiple = false;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof CheckboxComponent\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 CheckboxComponent\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 CheckboxComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Defines if checkbox has error\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Input() hasError = false;\n\n /**\n * Hide in-build errors for Reactive Forms\n *\n * @type {number}\n * @memberof CheckboxComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof CheckboxComponent\n */\n @Input() hideLabelInErrors = 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 CheckboxComponent\n */\n @Input() ariaLabelledby = '';\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 CheckboxComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Truncate text if it is too long\n * @type {string}\n * @memberof CheckboxComponent\n */\n @Input() truncateText = false;\n\n /**\n * Text alignment\n * @type {'center' | 'top'}\n * @memberof CheckboxComponent\n */\n @Input() alignment: Alignment = 'center';\n\n /**\n * Sets the tab index for the checkbox component.\n * This determines the order in which elements receive focus when the user navigates through them using the Tab key.\n * Default value is 0.\n *\n * @type {number}\n * @memberof CheckboxComponent\n */\n @Input() tabIndex = 0;\n\n /**\n * Event emitted when the checkbox's checked value changes.\n *\n * @type {boolean}\n * @memberof CheckboxComponent\n */\n @Output() changed = new EventEmitter<boolean>();\n\n /**\n * @ignore\n */\n onChange = (_: any) => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n showTooltip = false;\n classMultiple: string;\n\n @ViewChild('tooltip') tooltipElement: MatTooltip;\n @ViewChild('checkbox') checkboxElement: MatCheckbox;\n protected origin: string | null = null;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n private cdr: ChangeDetectorRef,\n @Optional() @Self() public ngControl: NgControl,\n private focusMonitor: FocusMonitor,\n private ngZone: NgZone,\n private destroyRef: DestroyRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnChanges(): void {\n this.setCompanyColor();\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.cdr.markForCheck();\n }\n }\n\n ngAfterViewInit(): void {\n const checkboxNativeInput = this.checkboxElement._inputElement.nativeElement;\n checkboxNativeInput.setAttribute('role', 'checkbox');\n checkboxNativeInput.setAttribute('aria-checked', (!!this.checked).toString());\n checkboxNativeInput.setAttribute('aria-disabled', (!!this.disabled).toString());\n checkboxNativeInput.setAttribute('aria-label', this.label);\n checkboxNativeInput.setAttribute('aria-required', this.ariaRequired.toString());\n this.focusMonitor\n .monitor(this.checkboxElement._inputElement.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin => this.ngZone.run(this.focusAction.bind(this, origin)));\n }\n\n focusAction(origin: FocusOrigin) {\n this.origin = origin;\n this.cdr.markForCheck();\n this.onFocus(origin === 'keyboard');\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.checkboxElement._inputElement.nativeElement);\n }\n\n emitChange(event: MatCheckboxChange): void {\n this.changed.emit(event.checked);\n }\n\n ngOnInit() {\n this.classMultiple = this.setClass();\n this.setCompanyColor();\n }\n\n toggleChecked(): void {\n this.checked = !this.checked;\n this.changed.emit(this.checked);\n this.onTouch();\n this.onChange(this.checked);\n if (!this.disabled) {\n this.indeterminate = false;\n this.classMultiple = this.setClass();\n }\n this.checkboxElement._inputElement.nativeElement.setAttribute('aria-checked', (!!this.checked).toString());\n this.checkboxElement._inputElement.nativeElement.setAttribute('aria-disabled', (!!this.disabled).toString());\n }\n\n setClass(): string {\n if (this.multiple) {\n return this.checked || this.indeterminate ? 'multiple-checked' : 'multiple-unchecked';\n }\n return '';\n }\n\n writeValue(value: boolean): void {\n this.checked = value;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onLabelEllipsisChange(isEllipsis: boolean): void {\n this.showTooltip = isEllipsis;\n }\n\n onFocus(isFocus: boolean): void {\n setTimeout(() => {\n if (this.tooltipElement) {\n if (isFocus && this.showTooltip) {\n this.tooltipElement.show();\n } else {\n this.tooltipElement.hide();\n }\n }\n }, 0);\n }\n\n private setCompanyColor(): void {\n this.companyColor = this.companyColor\n ? this.companyColor\n : this.applicationTheme === 'classic'\n ? '#46A997'\n : '#D410AA';\n }\n\n focus(): void {\n this.checkboxElement.focus();\n }\n}\n","<div\n #checkboxContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'checkbox-container' : 'checkbox'\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"toggleChecked(); checkboxContainer.focus()\"\n (keydown.space)=\"toggleChecked(); checkboxContainer.focus()\"\n>\n <mat-checkbox\n #checkbox\n (mouseleave)=\"checkbox.disableRipple = true\"\n (mouseenter)=\"checkbox.disableRipple = false\"\n [indeterminate]=\"indeterminate\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [name]=\"name\"\n [ngClass]=\"[checkbox.disableRipple ? 'disable-ripple' : '', origin ? 'cdk-' + origin + '-focused' : '']\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby || 'ariaDescribedby'\"\n (click)=\"toggleChecked()\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n class=\"checkbox\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip && truncateText ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >\n {{ label }}\n </span>\n }\n <ng-content select=\"[checkbox-label]\"></ng-content>\n </mat-checkbox>\n\n <mat-hint class=\"error\" *ngIf=\"ngControl?.errors | hasValidationError\">\n <ui-validation-error\n *ngIf=\"ngControl && !hideBuiltInErrors\"\n [ngControl]=\"ngControl\"\n [label]=\"hideLabelInErrors ? null : label\"\n ></ui-validation-error>\n </mat-hint>\n</div>\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\n\n@Directive({\n selector: '[uiFocusVisible]',\n standalone: true,\n})\nexport class FocusVisibleDirective {\n @Output() uiFocusVisible = new EventEmitter<boolean>();\n private hadKeyboardEvent = false;\n\n constructor() {}\n\n @HostListener('document:keydown', ['$event'])\n handleKeyboardEvent(): void {\n this.hadKeyboardEvent = true;\n }\n\n @HostListener('focus', ['$event'])\n onFocus(): void {\n if (this.hadKeyboardEvent) {\n this.uiFocusVisible.next(true);\n }\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.uiFocusVisible.next(false);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { CheckboxComponent } from './checkbox.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { FocusVisibleDirective } from './focus-visible.directive';\n\n@NgModule({\n declarations: [CheckboxComponent],\n imports: [\n CommonModule,\n MatCheckboxModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n IconComponentModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n EllipseTextDirective,\n MatTooltipModule,\n FocusVisibleDirective,\n ],\n exports: [CheckboxComponent],\n})\nexport class CheckboxComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA+CA;MACa,iBAAiB,CAAA;IAqL5B,WAAA,CAC6E,eAAiC,EACpG,GAAsB,EACH,SAAoB,EACvC,YAA0B,EAC1B,MAAc,EACd,UAAsB,EAAA;QAL6C,IAAA,CAAA,eAAe,GAAf,eAAe;QAClF,IAAA,CAAA,GAAG,GAAH,GAAG;QACgB,IAAA,CAAA,SAAS,GAAT,SAAS;QAC5B,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,UAAU,GAAV,UAAU;AAxLpB;;;;;;AAMG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;;AAMG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK;AAExB;;;;;;;AAOG;QACM,IAAA,CAAA,aAAa,GAAG,KAAK;AAa9B;;;;;AAKG;QACM,IAAA,CAAA,IAAI,GAAG,EAAE;AAElB;;;;;AAKG;QACM,IAAA,CAAA,KAAK,GAAG,EAAE;AAEnB;;;;;;AAMG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;;AAMG;QACM,IAAA,CAAA,gBAAgB,GAAqB,OAAO;AAUrD;;;;;AAKG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK;AAE7B;;;;;AAKG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEzB;;;;;AAKG;QACM,IAAA,CAAA,iBAAiB,GAAG,KAAK;AAElC;;;;;AAKG;QACM,IAAA,CAAA,iBAAiB,GAAG,KAAK;AAElC;;;;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,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAfhC,YAAY;YACZ,iBAAiB;YACjB,WAAW;YACX,mBAAmB;YACnB,cAAc;YACd,mBAAmB;YAEnB,qBAAqB;YAGrB,gBAAgB,CAAA,EAAA,CAAA,CAAA;;4FAKP,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAlBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBACnB,eAAe;wBACf,qBAAqB;wBACrB,sBAAsB;wBACtB,oBAAoB;wBACpB,gBAAgB;wBAChB,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA;;;AC/BD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, HostListener, Output, Input, Directive, Pipe, InjectionToken, inject } from '@angular/core';
2
+ import { Injectable, EventEmitter, HostListener, Output, Input, Directive, Pipe, input, inject, ElementRef, effect, InjectionToken } from '@angular/core';
3
3
  import { BehaviorSubject, Subject, combineLatest, startWith, debounceTime, map, Subscription } from 'rxjs';
4
4
  import { BreakpointObserver } from '@angular/cdk/layout';
5
5
 
@@ -10793,45 +10793,140 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
10793
10793
  }]
10794
10794
  }] });
10795
10795
 
10796
- /**
10797
- * the SelectTextDirective provides a dynamic way to highlight or style specific text within an element.
10798
- */
10796
+ const escapeRegExp = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
10799
10797
  class SelectTextDirective {
10800
- constructor(el) {
10801
- this.el = el;
10798
+ constructor() {
10799
+ this.selectText = input(null);
10800
+ this.el = inject(ElementRef);
10801
+ this.highlighted = false;
10802
+ effect(() => {
10803
+ this.highlight(this.selectText());
10804
+ });
10802
10805
  }
10803
- /**
10804
- * this method utilizes setTimeout to defer the execution until the next tick of the event loop.
10805
- * The text content of the element is modified by wrapping occurrences of the specified selectText with a <span> element,
10806
- * applying a bold font-weight style.
10807
- */
10808
- setTextColor() {
10809
- const textElement = this.el.nativeElement;
10810
- setTimeout(() => {
10811
- const { textContent } = textElement;
10812
- if (this.selectText && textContent) {
10813
- textElement.innerHTML = textContent.replace(new RegExp(this.selectText, 'gmi'), match => `<span style="font-weight: bold" >${match}</span>`);
10806
+ highlight(term) {
10807
+ const el = this.el.nativeElement;
10808
+ if (!term) {
10809
+ // Only restore if we previously replaced Angular's content with highlighted nodes.
10810
+ // Never touch the DOM on init — that destroys Angular's tracked text interpolation
10811
+ // nodes, breaking CDK virtual scroll recycling.
10812
+ if (this.highlighted) {
10813
+ el.replaceChildren(document.createTextNode(el.textContent ?? ''));
10814
+ this.highlighted = false;
10814
10815
  }
10815
- }, 0);
10816
- }
10817
- ngOnChanges() {
10818
- if (this.selectText) {
10819
- this.setTextColor();
10816
+ return;
10820
10817
  }
10818
+ const plainText = el.textContent ?? '';
10819
+ const escaped = escapeRegExp(term);
10820
+ const regex = new RegExp(escaped, 'gi');
10821
+ const parts = plainText.split(regex);
10822
+ const matches = plainText.match(regex) ?? [];
10823
+ const fragment = document.createDocumentFragment();
10824
+ parts.forEach((part, i) => {
10825
+ fragment.appendChild(document.createTextNode(part));
10826
+ if (matches[i]) {
10827
+ const span = document.createElement('span');
10828
+ span.style.fontWeight = 'bold';
10829
+ span.textContent = matches[i];
10830
+ fragment.appendChild(span);
10831
+ }
10832
+ });
10833
+ el.replaceChildren(fragment);
10834
+ this.highlighted = true;
10821
10835
  }
10822
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SelectTextDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
10823
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: SelectTextDirective, isStandalone: false, selector: "[selectText]", inputs: { selectText: "selectText" }, usesOnChanges: true, ngImport: i0 }); }
10836
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SelectTextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
10837
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.20", type: SelectTextDirective, isStandalone: true, selector: "[selectText]", inputs: { selectText: { classPropertyName: "selectText", publicName: "selectText", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
10824
10838
  }
10825
10839
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SelectTextDirective, decorators: [{
10826
10840
  type: Directive,
10827
10841
  args: [{
10828
10842
  selector: '[selectText]',
10829
- standalone: false,
10843
+ standalone: true,
10830
10844
  }]
10831
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { selectText: [{
10832
- type: Input
10845
+ }], ctorParameters: () => [] });
10846
+
10847
+ class PreventInputDirective {
10848
+ constructor() {
10849
+ this.uiPreventInput = input(false);
10850
+ }
10851
+ onKeyDown(event) {
10852
+ const allowedKeys = [
10853
+ 'ArrowLeft',
10854
+ 'ArrowRight',
10855
+ 'ArrowUp',
10856
+ 'ArrowDown',
10857
+ 'Backspace',
10858
+ 'Tab',
10859
+ 'Delete',
10860
+ 'Control',
10861
+ 'Shift',
10862
+ 'Alt',
10863
+ ];
10864
+ if (!allowedKeys.includes(event.key) && !event.ctrlKey && !event.metaKey && this.uiPreventInput()) {
10865
+ event.preventDefault();
10866
+ }
10867
+ }
10868
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PreventInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
10869
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.20", type: PreventInputDirective, isStandalone: true, selector: "[uiPreventInput]", inputs: { uiPreventInput: { classPropertyName: "uiPreventInput", publicName: "uiPreventInput", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
10870
+ }
10871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PreventInputDirective, decorators: [{
10872
+ type: Directive,
10873
+ args: [{
10874
+ selector: '[uiPreventInput]',
10875
+ standalone: true,
10876
+ }]
10877
+ }], propDecorators: { onKeyDown: [{
10878
+ type: HostListener,
10879
+ args: ['keydown', ['$event']]
10833
10880
  }] } });
10834
10881
 
10882
+ class IncludesPipe {
10883
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access
10884
+ transform(value, values, valueField) {
10885
+ return Array.isArray(values)
10886
+ ? !!values.find(v => (valueField ? v?.[valueField] === value?.[valueField] : value === v))
10887
+ : valueField
10888
+ ? value?.[valueField] === values?.[valueField]
10889
+ : value === values;
10890
+ }
10891
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IncludesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
10892
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: IncludesPipe, isStandalone: true, name: "includes" }); }
10893
+ }
10894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IncludesPipe, decorators: [{
10895
+ type: Pipe,
10896
+ args: [{
10897
+ name: 'includes',
10898
+ standalone: true,
10899
+ }]
10900
+ }] });
10901
+
10902
+ class TransformItemPipe {
10903
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-member-access
10904
+ transform(value, field, getValueList = false) {
10905
+ if (!value)
10906
+ return '';
10907
+ if (getValueList) {
10908
+ return Array.isArray(value)
10909
+ ? value.map(item => (field ? (item[field] ?? '') : ''))
10910
+ : field
10911
+ ? (value?.[field] ?? '')
10912
+ : '';
10913
+ }
10914
+ if (Array.isArray(value)) {
10915
+ return field ? (value[0]?.[field] ?? '') : '';
10916
+ }
10917
+ return field ? (value?.[field] ?? '') : '';
10918
+ }
10919
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TransformItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
10920
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: TransformItemPipe, isStandalone: true, name: "transformItem" }); }
10921
+ }
10922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TransformItemPipe, decorators: [{
10923
+ type: Pipe,
10924
+ args: [{
10925
+ name: 'transformItem',
10926
+ standalone: true,
10927
+ }]
10928
+ }] });
10929
+
10835
10930
  var ScreenBreakpoints;
10836
10931
  (function (ScreenBreakpoints) {
10837
10932
  ScreenBreakpoints[ScreenBreakpoints["MOBILE"] = 600] = "MOBILE";
@@ -11267,5 +11362,5 @@ const alertBarsUtil = {
11267
11362
  * Generated bundle index. Do not edit.
11268
11363
  */
11269
11364
 
11270
- export { AutocompleteUtils, Color, DataPropertyGetterPipe, DigitsOnlyDirective, DynamicComponentDirective, EllipseTextDirective, HasValidationErrorPipe, IKeyboardEvent, IS_LARGE_TABLET_TOKEN, IS_MOBILE_TOKEN, Language, LanguageService, MemoizeFuncPipe, OrdinalSuffixPipe, ScreenBreakpoints, SelectTextDirective, TruncatePipe, UiTranslatePipe, adjustLightness, alertBarsUtil, getAvailableLangs, hexToHsl, hexToRgbWithAlpha, hslToHex };
11365
+ export { AutocompleteUtils, Color, DataPropertyGetterPipe, DigitsOnlyDirective, DynamicComponentDirective, EllipseTextDirective, HasValidationErrorPipe, IKeyboardEvent, IS_LARGE_TABLET_TOKEN, IS_MOBILE_TOKEN, IncludesPipe, Language, LanguageService, MemoizeFuncPipe, OrdinalSuffixPipe, PreventInputDirective, ScreenBreakpoints, SelectTextDirective, TransformItemPipe, TruncatePipe, UiTranslatePipe, adjustLightness, alertBarsUtil, getAvailableLangs, hexToHsl, hexToRgbWithAlpha, hslToHex };
11271
11366
  //# sourceMappingURL=testgorilla-tgo-ui-components-core.mjs.map