@datarailsshared/datarailsshared 1.5.263 → 1.5.264
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.
- package/datarailsshared-datarailsshared-1.5.264.tgz +0 -0
- package/esm2022/lib/dr-inputs/checkbox/checkbox.component.mjs +18 -5
- package/fesm2022/datarailsshared-datarailsshared.mjs +15 -3
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-inputs/checkbox/checkbox.component.d.ts +5 -2
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.5.263.tgz +0 -0
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, HostBinding, Input, Output, } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Input, Output, ViewChild, } from '@angular/core';
|
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../dr-tooltip/dr-tooltip.directive";
|
|
4
5
|
export class CheckboxComponent {
|
|
5
6
|
get indeterminate() {
|
|
6
7
|
return this._indeterminate;
|
|
@@ -20,6 +21,12 @@ export class CheckboxComponent {
|
|
|
20
21
|
this.onTouched = () => {
|
|
21
22
|
};
|
|
22
23
|
}
|
|
24
|
+
ngAfterViewInit() {
|
|
25
|
+
const element = this.checkboxContent.nativeElement;
|
|
26
|
+
if (this.textNowrap && element.scrollWidth > element.clientWidth) {
|
|
27
|
+
this.tooltip = element.innerText;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
23
30
|
writeValue(value) {
|
|
24
31
|
this.checkedStatus = value;
|
|
25
32
|
this.cdr.markForCheck();
|
|
@@ -42,19 +49,22 @@ export class CheckboxComponent {
|
|
|
42
49
|
this.onTouched();
|
|
43
50
|
}
|
|
44
51
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CheckboxComponent, selector: "dr-checkbox", inputs: { checkedStatus: "checkedStatus", disabled: "disabled", icon: "icon", indeterminate: "indeterminate", textNowrap: "textNowrap" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "class.text-nowrap": "this.textNowrap" } }, providers: [
|
|
52
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CheckboxComponent, selector: "dr-checkbox", inputs: { checkedStatus: "checkedStatus", disabled: "disabled", icon: "icon", indeterminate: "indeterminate", textNowrap: "textNowrap" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "class.disabled": "this.disabled", "class.text-nowrap": "this.textNowrap" } }, providers: [
|
|
46
53
|
{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }
|
|
47
|
-
], ngImport: i0, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span [class]=\"icon\"
|
|
54
|
+
], viewQueries: [{ propertyName: "checkboxContent", first: true, predicate: ["checkboxContent"], descendants: true }], ngImport: i0, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span #checkboxContent\n [class]=\"icon\"\n [class.indeterminate]=\"indeterminate\"\n [drTooltip]=\"tooltip\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: ["input+span{vertical-align:middle;line-height:30px}input+span,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:0}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}:host.text-nowrap label input+span{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis;line-height:20px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;min-height:12px;line-height:12px;min-width:12px;margin-right:5px;border:1.5px solid #8f929e;background-color:#fff;font-weight:400;margin-top:-1px}label input+span:before,label:hover input+span:before{background-color:#fff;border-color:#8f929e;color:#4646ce;border-radius:2px}label input:checked+span:before,label:hover input:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M1 5L4.5 8.5L11 1.5\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:checked+span.cross:before,label:hover input:checked+span.cross:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.91786 4.99992L9.03356 1.88386C9.11927 1.79808 9.16654 1.68365 9.16668 1.56162C9.16668 1.43952 9.1194 1.32495 9.03356 1.23931L8.7605 0.966323C8.67466 0.880342 8.56026 0.833252 8.43811 0.833252C8.31615 0.833252 8.20169 0.880342 8.11585 0.966323L5.00016 4.08218L1.88431 0.966323C1.79861 0.880342 1.68407 0.833252 1.56199 0.833252C1.44004 0.833252 1.32559 0.880342 1.23988 0.966323L0.966677 1.23931C0.788899 1.4171 0.788899 1.70628 0.966677 1.88386L4.08245 4.99992L0.966677 8.11584C0.880904 8.20175 0.833707 8.31619 0.833707 8.43822C0.833707 8.56025 0.880904 8.67468 0.966677 8.76053L1.23981 9.03351C1.32551 9.11943 1.44003 9.16658 1.56191 9.16658C1.684 9.16658 1.79853 9.11943 1.88424 9.03351L5.00008 5.91759L8.11578 9.03351C8.20162 9.11943 8.31608 9.16658 8.43803 9.16658C8.56005 9.16658 8.67459 9.11943 8.76043 9.03351L9.03349 8.76053C9.11919 8.67475 9.16646 8.56025 9.16646 8.43822C9.16646 8.31619 9.11919 8.20175 9.03349 8.11591L5.91786 4.99992Z\" fill=\"white\"/></svg>')}label input+span.indeterminate:before,label:hover input+span.indeterminate:before{content:url('data:image/svg+xml; utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 2\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25L11 0.250001C11.4142 0.250001 11.75 0.585787 11.75 1C11.75 1.41421 11.4142 1.75 11 1.75L1 1.75C0.585786 1.75 0.25 1.41421 0.25 1Z\" fill=\"white\"/></svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:disabled+span{color:#8f929e}label input:disabled+span:before{border-color:#dfe0e3;pointer-events:none}label input[disabled]:checked+span:before{background:#8f929e;border-color:#8f929e;pointer-events:none}:host label{position:relative}:host label:hover:after{content:\"\";width:24px;height:24px;background:#f2f2fb;border-radius:50%;position:absolute;left:-4px;top:.5px}:host.disabled label:hover:after{display:none}\n"], dependencies: [{ kind: "directive", type: i1.DrTooltipDirective, selector: "[drTooltip]", inputs: ["drTooltip", "drTooltipContext", "drTooltipPosition", "drTooltipClass", "drTooltipTheme", "drTooltipMousleaveTimeout", "drTooltipOptions", "drTooltipShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
48
55
|
}
|
|
49
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
50
57
|
type: Component,
|
|
51
58
|
args: [{ selector: 'dr-checkbox', providers: [
|
|
52
59
|
{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }
|
|
53
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span [class]=\"icon\"
|
|
60
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span #checkboxContent\n [class]=\"icon\"\n [class.indeterminate]=\"indeterminate\"\n [drTooltip]=\"tooltip\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: ["input+span{vertical-align:middle;line-height:30px}input+span,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:0}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}:host.text-nowrap label input+span{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis;line-height:20px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;min-height:12px;line-height:12px;min-width:12px;margin-right:5px;border:1.5px solid #8f929e;background-color:#fff;font-weight:400;margin-top:-1px}label input+span:before,label:hover input+span:before{background-color:#fff;border-color:#8f929e;color:#4646ce;border-radius:2px}label input:checked+span:before,label:hover input:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M1 5L4.5 8.5L11 1.5\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:checked+span.cross:before,label:hover input:checked+span.cross:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.91786 4.99992L9.03356 1.88386C9.11927 1.79808 9.16654 1.68365 9.16668 1.56162C9.16668 1.43952 9.1194 1.32495 9.03356 1.23931L8.7605 0.966323C8.67466 0.880342 8.56026 0.833252 8.43811 0.833252C8.31615 0.833252 8.20169 0.880342 8.11585 0.966323L5.00016 4.08218L1.88431 0.966323C1.79861 0.880342 1.68407 0.833252 1.56199 0.833252C1.44004 0.833252 1.32559 0.880342 1.23988 0.966323L0.966677 1.23931C0.788899 1.4171 0.788899 1.70628 0.966677 1.88386L4.08245 4.99992L0.966677 8.11584C0.880904 8.20175 0.833707 8.31619 0.833707 8.43822C0.833707 8.56025 0.880904 8.67468 0.966677 8.76053L1.23981 9.03351C1.32551 9.11943 1.44003 9.16658 1.56191 9.16658C1.684 9.16658 1.79853 9.11943 1.88424 9.03351L5.00008 5.91759L8.11578 9.03351C8.20162 9.11943 8.31608 9.16658 8.43803 9.16658C8.56005 9.16658 8.67459 9.11943 8.76043 9.03351L9.03349 8.76053C9.11919 8.67475 9.16646 8.56025 9.16646 8.43822C9.16646 8.31619 9.11919 8.20175 9.03349 8.11591L5.91786 4.99992Z\" fill=\"white\"/></svg>')}label input+span.indeterminate:before,label:hover input+span.indeterminate:before{content:url('data:image/svg+xml; utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 2\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25L11 0.250001C11.4142 0.250001 11.75 0.585787 11.75 1C11.75 1.41421 11.4142 1.75 11 1.75L1 1.75C0.585786 1.75 0.25 1.41421 0.25 1Z\" fill=\"white\"/></svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:disabled+span{color:#8f929e}label input:disabled+span:before{border-color:#dfe0e3;pointer-events:none}label input[disabled]:checked+span:before{background:#8f929e;border-color:#8f929e;pointer-events:none}:host label{position:relative}:host label:hover:after{content:\"\";width:24px;height:24px;background:#f2f2fb;border-radius:50%;position:absolute;left:-4px;top:.5px}:host.disabled label:hover:after{display:none}\n"] }]
|
|
54
61
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { checkedStatus: [{
|
|
55
62
|
type: Input
|
|
56
63
|
}], disabled: [{
|
|
57
64
|
type: Input
|
|
65
|
+
}, {
|
|
66
|
+
type: HostBinding,
|
|
67
|
+
args: ['class.disabled']
|
|
58
68
|
}], icon: [{
|
|
59
69
|
type: Input
|
|
60
70
|
}], indeterminate: [{
|
|
@@ -66,5 +76,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
66
76
|
args: ['class.text-nowrap']
|
|
67
77
|
}], checkedChange: [{
|
|
68
78
|
type: Output
|
|
79
|
+
}], checkboxContent: [{
|
|
80
|
+
type: ViewChild,
|
|
81
|
+
args: ['checkboxContent']
|
|
69
82
|
}] } });
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGF0YXJhaWxzc2hhcmVkL3NyYy9saWIvZHItaW5wdXRzL2NoZWNrYm94L2NoZWNrYm94LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uL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ICAgICAgW2RyVG9vbHRpcF09XCJ0b29sdGlwXCI+XG4gICAgICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG4gIDwvc3Bhbj5cbjwvbGFiZWw+XG4iXX0=
|
|
@@ -3012,6 +3012,12 @@ class CheckboxComponent {
|
|
|
3012
3012
|
this.onTouched = () => {
|
|
3013
3013
|
};
|
|
3014
3014
|
}
|
|
3015
|
+
ngAfterViewInit() {
|
|
3016
|
+
const element = this.checkboxContent.nativeElement;
|
|
3017
|
+
if (this.textNowrap && element.scrollWidth > element.clientWidth) {
|
|
3018
|
+
this.tooltip = element.innerText;
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3015
3021
|
writeValue(value) {
|
|
3016
3022
|
this.checkedStatus = value;
|
|
3017
3023
|
this.cdr.markForCheck();
|
|
@@ -3034,19 +3040,22 @@ class CheckboxComponent {
|
|
|
3034
3040
|
this.onTouched();
|
|
3035
3041
|
}
|
|
3036
3042
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3037
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CheckboxComponent, selector: "dr-checkbox", inputs: { checkedStatus: "checkedStatus", disabled: "disabled", icon: "icon", indeterminate: "indeterminate", textNowrap: "textNowrap" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "class.text-nowrap": "this.textNowrap" } }, providers: [
|
|
3043
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CheckboxComponent, selector: "dr-checkbox", inputs: { checkedStatus: "checkedStatus", disabled: "disabled", icon: "icon", indeterminate: "indeterminate", textNowrap: "textNowrap" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "class.disabled": "this.disabled", "class.text-nowrap": "this.textNowrap" } }, providers: [
|
|
3038
3044
|
{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }
|
|
3039
|
-
], ngImport: i0, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span [class]=\"icon\"
|
|
3045
|
+
], viewQueries: [{ propertyName: "checkboxContent", first: true, predicate: ["checkboxContent"], descendants: true }], ngImport: i0, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span #checkboxContent\n [class]=\"icon\"\n [class.indeterminate]=\"indeterminate\"\n [drTooltip]=\"tooltip\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: ["input+span{vertical-align:middle;line-height:30px}input+span,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:0}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}:host.text-nowrap label input+span{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis;line-height:20px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;min-height:12px;line-height:12px;min-width:12px;margin-right:5px;border:1.5px solid #8f929e;background-color:#fff;font-weight:400;margin-top:-1px}label input+span:before,label:hover input+span:before{background-color:#fff;border-color:#8f929e;color:#4646ce;border-radius:2px}label input:checked+span:before,label:hover input:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M1 5L4.5 8.5L11 1.5\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:checked+span.cross:before,label:hover input:checked+span.cross:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.91786 4.99992L9.03356 1.88386C9.11927 1.79808 9.16654 1.68365 9.16668 1.56162C9.16668 1.43952 9.1194 1.32495 9.03356 1.23931L8.7605 0.966323C8.67466 0.880342 8.56026 0.833252 8.43811 0.833252C8.31615 0.833252 8.20169 0.880342 8.11585 0.966323L5.00016 4.08218L1.88431 0.966323C1.79861 0.880342 1.68407 0.833252 1.56199 0.833252C1.44004 0.833252 1.32559 0.880342 1.23988 0.966323L0.966677 1.23931C0.788899 1.4171 0.788899 1.70628 0.966677 1.88386L4.08245 4.99992L0.966677 8.11584C0.880904 8.20175 0.833707 8.31619 0.833707 8.43822C0.833707 8.56025 0.880904 8.67468 0.966677 8.76053L1.23981 9.03351C1.32551 9.11943 1.44003 9.16658 1.56191 9.16658C1.684 9.16658 1.79853 9.11943 1.88424 9.03351L5.00008 5.91759L8.11578 9.03351C8.20162 9.11943 8.31608 9.16658 8.43803 9.16658C8.56005 9.16658 8.67459 9.11943 8.76043 9.03351L9.03349 8.76053C9.11919 8.67475 9.16646 8.56025 9.16646 8.43822C9.16646 8.31619 9.11919 8.20175 9.03349 8.11591L5.91786 4.99992Z\" fill=\"white\"/></svg>')}label input+span.indeterminate:before,label:hover input+span.indeterminate:before{content:url('data:image/svg+xml; utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 2\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25L11 0.250001C11.4142 0.250001 11.75 0.585787 11.75 1C11.75 1.41421 11.4142 1.75 11 1.75L1 1.75C0.585786 1.75 0.25 1.41421 0.25 1Z\" fill=\"white\"/></svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:disabled+span{color:#8f929e}label input:disabled+span:before{border-color:#dfe0e3;pointer-events:none}label input[disabled]:checked+span:before{background:#8f929e;border-color:#8f929e;pointer-events:none}:host label{position:relative}:host label:hover:after{content:\"\";width:24px;height:24px;background:#f2f2fb;border-radius:50%;position:absolute;left:-4px;top:.5px}:host.disabled label:hover:after{display:none}\n"], dependencies: [{ kind: "directive", type: DrTooltipDirective, selector: "[drTooltip]", inputs: ["drTooltip", "drTooltipContext", "drTooltipPosition", "drTooltipClass", "drTooltipTheme", "drTooltipMousleaveTimeout", "drTooltipOptions", "drTooltipShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3040
3046
|
}
|
|
3041
3047
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
3042
3048
|
type: Component,
|
|
3043
3049
|
args: [{ selector: 'dr-checkbox', providers: [
|
|
3044
3050
|
{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }
|
|
3045
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span [class]=\"icon\"
|
|
3051
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label>\n <input type=\"checkbox\"\n [attr.data-test]=\"checkedStatus ? 'checked' : 'unchecked'\"\n [checked]=\"checkedStatus\"\n [disabled]=\"disabled\"\n (change)=\"setValue($event)\"\n (click)=\"$event.stopPropagation()\">\n <span #checkboxContent\n [class]=\"icon\"\n [class.indeterminate]=\"indeterminate\"\n [drTooltip]=\"tooltip\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: ["input+span{vertical-align:middle;line-height:30px}input+span,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:0}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}:host.text-nowrap label input+span{white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis;line-height:20px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;min-height:12px;line-height:12px;min-width:12px;margin-right:5px;border:1.5px solid #8f929e;background-color:#fff;font-weight:400;margin-top:-1px}label input+span:before,label:hover input+span:before{background-color:#fff;border-color:#8f929e;color:#4646ce;border-radius:2px}label input:checked+span:before,label:hover input:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M1 5L4.5 8.5L11 1.5\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:checked+span.cross:before,label:hover input:checked+span.cross:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.91786 4.99992L9.03356 1.88386C9.11927 1.79808 9.16654 1.68365 9.16668 1.56162C9.16668 1.43952 9.1194 1.32495 9.03356 1.23931L8.7605 0.966323C8.67466 0.880342 8.56026 0.833252 8.43811 0.833252C8.31615 0.833252 8.20169 0.880342 8.11585 0.966323L5.00016 4.08218L1.88431 0.966323C1.79861 0.880342 1.68407 0.833252 1.56199 0.833252C1.44004 0.833252 1.32559 0.880342 1.23988 0.966323L0.966677 1.23931C0.788899 1.4171 0.788899 1.70628 0.966677 1.88386L4.08245 4.99992L0.966677 8.11584C0.880904 8.20175 0.833707 8.31619 0.833707 8.43822C0.833707 8.56025 0.880904 8.67468 0.966677 8.76053L1.23981 9.03351C1.32551 9.11943 1.44003 9.16658 1.56191 9.16658C1.684 9.16658 1.79853 9.11943 1.88424 9.03351L5.00008 5.91759L8.11578 9.03351C8.20162 9.11943 8.31608 9.16658 8.43803 9.16658C8.56005 9.16658 8.67459 9.11943 8.76043 9.03351L9.03349 8.76053C9.11919 8.67475 9.16646 8.56025 9.16646 8.43822C9.16646 8.31619 9.11919 8.20175 9.03349 8.11591L5.91786 4.99992Z\" fill=\"white\"/></svg>')}label input+span.indeterminate:before,label:hover input+span.indeterminate:before{content:url('data:image/svg+xml; utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 2\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25L11 0.250001C11.4142 0.250001 11.75 0.585787 11.75 1C11.75 1.41421 11.4142 1.75 11 1.75L1 1.75C0.585786 1.75 0.25 1.41421 0.25 1Z\" fill=\"white\"/></svg>');background:#4646ce;border-color:#4646ce;color:#fff}label input:disabled+span{color:#8f929e}label input:disabled+span:before{border-color:#dfe0e3;pointer-events:none}label input[disabled]:checked+span:before{background:#8f929e;border-color:#8f929e;pointer-events:none}:host label{position:relative}:host label:hover:after{content:\"\";width:24px;height:24px;background:#f2f2fb;border-radius:50%;position:absolute;left:-4px;top:.5px}:host.disabled label:hover:after{display:none}\n"] }]
|
|
3046
3052
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { checkedStatus: [{
|
|
3047
3053
|
type: Input
|
|
3048
3054
|
}], disabled: [{
|
|
3049
3055
|
type: Input
|
|
3056
|
+
}, {
|
|
3057
|
+
type: HostBinding,
|
|
3058
|
+
args: ['class.disabled']
|
|
3050
3059
|
}], icon: [{
|
|
3051
3060
|
type: Input
|
|
3052
3061
|
}], indeterminate: [{
|
|
@@ -3058,6 +3067,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3058
3067
|
args: ['class.text-nowrap']
|
|
3059
3068
|
}], checkedChange: [{
|
|
3060
3069
|
type: Output
|
|
3070
|
+
}], checkboxContent: [{
|
|
3071
|
+
type: ViewChild,
|
|
3072
|
+
args: ['checkboxContent']
|
|
3061
3073
|
}] } });
|
|
3062
3074
|
|
|
3063
3075
|
class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
|