1 | import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
2 | import * as i0 from '@angular/core';
|
3 | import { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Optional, Inject, NgModule } from '@angular/core';
|
4 | import { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';
|
5 | import * as i2 from '@angular/material/core';
|
6 | import { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRipple, MatRippleModule, MatCommonModule } from '@angular/material/core';
|
7 | import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
8 | import * as i1 from '@angular/cdk/a11y';
|
9 | import * as i3 from '@angular/cdk/observers';
|
10 | import { ObserversModule } from '@angular/cdk/observers';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | const MAT_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken('mat-checkbox-default-options', {
|
21 | providedIn: 'root',
|
22 | factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,
|
23 | });
|
24 |
|
25 | function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY() {
|
26 | return {
|
27 | color: 'accent',
|
28 | clickAction: 'check-indeterminate',
|
29 | };
|
30 | }
|
31 |
|
32 |
|
33 | let nextUniqueId = 0;
|
34 |
|
35 | const defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
|
42 | provide: NG_VALUE_ACCESSOR,
|
43 | useExisting: forwardRef(() => MatCheckbox),
|
44 | multi: true,
|
45 | };
|
46 |
|
47 | class MatCheckboxChange {
|
48 | }
|
49 |
|
50 |
|
51 | const _MatCheckboxMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {
|
52 | constructor(_elementRef) {
|
53 | this._elementRef = _elementRef;
|
54 | }
|
55 | }))));
|
56 | class _MatCheckboxBase extends _MatCheckboxMixinBase {
|
57 | constructor(idPrefix, elementRef, _changeDetectorRef, _ngZone, tabIndex, _animationMode, _options) {
|
58 | super(elementRef);
|
59 | this._changeDetectorRef = _changeDetectorRef;
|
60 | this._ngZone = _ngZone;
|
61 | this._animationMode = _animationMode;
|
62 | this._options = _options;
|
63 | |
64 |
|
65 |
|
66 |
|
67 | this.ariaLabel = '';
|
68 | |
69 |
|
70 |
|
71 | this.ariaLabelledby = null;
|
72 |
|
73 | this.labelPosition = 'after';
|
74 |
|
75 | this.name = null;
|
76 |
|
77 | this.change = new EventEmitter();
|
78 |
|
79 | this.indeterminateChange = new EventEmitter();
|
80 | |
81 |
|
82 |
|
83 |
|
84 | this._onTouched = () => { };
|
85 | this._currentAnimationClass = '';
|
86 | this._currentCheckState = 0 ;
|
87 | this._controlValueAccessorChangeFn = () => { };
|
88 | this._checked = false;
|
89 | this._disabled = false;
|
90 | this._indeterminate = false;
|
91 | this._options = this._options || defaults;
|
92 | this.color = this.defaultColor = this._options.color || defaults.color;
|
93 | this.tabIndex = parseInt(tabIndex) || 0;
|
94 | this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;
|
95 | }
|
96 |
|
97 | get inputId() {
|
98 | return `${this.id || this._uniqueId}-input`;
|
99 | }
|
100 |
|
101 | get required() {
|
102 | return this._required;
|
103 | }
|
104 | set required(value) {
|
105 | this._required = coerceBooleanProperty(value);
|
106 | }
|
107 | ngAfterViewInit() {
|
108 | this._syncIndeterminate(this._indeterminate);
|
109 | }
|
110 |
|
111 | get checked() {
|
112 | return this._checked;
|
113 | }
|
114 | set checked(value) {
|
115 | const checked = coerceBooleanProperty(value);
|
116 | if (checked != this.checked) {
|
117 | this._checked = checked;
|
118 | this._changeDetectorRef.markForCheck();
|
119 | }
|
120 | }
|
121 | |
122 |
|
123 |
|
124 |
|
125 | get disabled() {
|
126 | return this._disabled;
|
127 | }
|
128 | set disabled(value) {
|
129 | const newValue = coerceBooleanProperty(value);
|
130 | if (newValue !== this.disabled) {
|
131 | this._disabled = newValue;
|
132 | this._changeDetectorRef.markForCheck();
|
133 | }
|
134 | }
|
135 | |
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | get indeterminate() {
|
142 | return this._indeterminate;
|
143 | }
|
144 | set indeterminate(value) {
|
145 | const changed = value != this._indeterminate;
|
146 | this._indeterminate = coerceBooleanProperty(value);
|
147 | if (changed) {
|
148 | if (this._indeterminate) {
|
149 | this._transitionCheckState(3 );
|
150 | }
|
151 | else {
|
152 | this._transitionCheckState(this.checked ? 1 : 2 );
|
153 | }
|
154 | this.indeterminateChange.emit(this._indeterminate);
|
155 | }
|
156 | this._syncIndeterminate(this._indeterminate);
|
157 | }
|
158 | _isRippleDisabled() {
|
159 | return this.disableRipple || this.disabled;
|
160 | }
|
161 |
|
162 | _onLabelTextChange() {
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 | this._changeDetectorRef.detectChanges();
|
169 | }
|
170 |
|
171 | writeValue(value) {
|
172 | this.checked = !!value;
|
173 | }
|
174 |
|
175 | registerOnChange(fn) {
|
176 | this._controlValueAccessorChangeFn = fn;
|
177 | }
|
178 |
|
179 | registerOnTouched(fn) {
|
180 | this._onTouched = fn;
|
181 | }
|
182 |
|
183 | setDisabledState(isDisabled) {
|
184 | this.disabled = isDisabled;
|
185 | }
|
186 | _getAriaChecked() {
|
187 | if (this.checked) {
|
188 | return 'true';
|
189 | }
|
190 | return this.indeterminate ? 'mixed' : 'false';
|
191 | }
|
192 | _transitionCheckState(newState) {
|
193 | let oldState = this._currentCheckState;
|
194 | let element = this._getAnimationTargetElement();
|
195 | if (oldState === newState || !element) {
|
196 | return;
|
197 | }
|
198 | if (this._currentAnimationClass.length > 0) {
|
199 | element.classList.remove(this._currentAnimationClass);
|
200 | }
|
201 | this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);
|
202 | this._currentCheckState = newState;
|
203 | if (this._currentAnimationClass.length > 0) {
|
204 | element.classList.add(this._currentAnimationClass);
|
205 |
|
206 | const animationClass = this._currentAnimationClass;
|
207 | this._ngZone.runOutsideAngular(() => {
|
208 | setTimeout(() => {
|
209 | element.classList.remove(animationClass);
|
210 | }, 1000);
|
211 | });
|
212 | }
|
213 | }
|
214 | _emitChangeEvent() {
|
215 | this._controlValueAccessorChangeFn(this.checked);
|
216 | this.change.emit(this._createChangeEvent(this.checked));
|
217 |
|
218 |
|
219 | if (this._inputElement) {
|
220 | this._inputElement.nativeElement.checked = this.checked;
|
221 | }
|
222 | }
|
223 |
|
224 | toggle() {
|
225 | this.checked = !this.checked;
|
226 | this._controlValueAccessorChangeFn(this.checked);
|
227 | }
|
228 | _handleInputClick() {
|
229 | var _a;
|
230 | const clickAction = (_a = this._options) === null || _a === void 0 ? void 0 : _a.clickAction;
|
231 |
|
232 | if (!this.disabled && clickAction !== 'noop') {
|
233 |
|
234 | if (this.indeterminate && clickAction !== 'check') {
|
235 | Promise.resolve().then(() => {
|
236 | this._indeterminate = false;
|
237 | this.indeterminateChange.emit(this._indeterminate);
|
238 | });
|
239 | }
|
240 | this._checked = !this._checked;
|
241 | this._transitionCheckState(this._checked ? 1 : 2 );
|
242 |
|
243 |
|
244 |
|
245 | this._emitChangeEvent();
|
246 | }
|
247 | else if (!this.disabled && clickAction === 'noop') {
|
248 |
|
249 |
|
250 | this._inputElement.nativeElement.checked = this.checked;
|
251 | this._inputElement.nativeElement.indeterminate = this.indeterminate;
|
252 | }
|
253 | }
|
254 | _onInteractionEvent(event) {
|
255 |
|
256 |
|
257 |
|
258 | event.stopPropagation();
|
259 | }
|
260 | _onBlur() {
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 | Promise.resolve().then(() => {
|
267 | this._onTouched();
|
268 | this._changeDetectorRef.markForCheck();
|
269 | });
|
270 | }
|
271 | _getAnimationClassForCheckStateTransition(oldState, newState) {
|
272 |
|
273 | if (this._animationMode === 'NoopAnimations') {
|
274 | return '';
|
275 | }
|
276 | switch (oldState) {
|
277 | case 0 :
|
278 |
|
279 |
|
280 | if (newState === 1 ) {
|
281 | return this._animationClasses.uncheckedToChecked;
|
282 | }
|
283 | else if (newState == 3 ) {
|
284 | return this._animationClasses.uncheckedToIndeterminate;
|
285 | }
|
286 | break;
|
287 | case 2 :
|
288 | return newState === 1
|
289 | ? this._animationClasses.uncheckedToChecked
|
290 | : this._animationClasses.uncheckedToIndeterminate;
|
291 | case 1 :
|
292 | return newState === 2
|
293 | ? this._animationClasses.checkedToUnchecked
|
294 | : this._animationClasses.checkedToIndeterminate;
|
295 | case 3 :
|
296 | return newState === 1
|
297 | ? this._animationClasses.indeterminateToChecked
|
298 | : this._animationClasses.indeterminateToUnchecked;
|
299 | }
|
300 | return '';
|
301 | }
|
302 | |
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 | _syncIndeterminate(value) {
|
311 | const nativeCheckbox = this._inputElement;
|
312 | if (nativeCheckbox) {
|
313 | nativeCheckbox.nativeElement.indeterminate = value;
|
314 | }
|
315 | }
|
316 | }
|
317 | _MatCheckboxBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatCheckboxBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
318 | _MatCheckboxBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: _MatCheckboxBase, inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], id: "id", required: "required", labelPosition: "labelPosition", name: "name", value: "value", checked: "checked", disabled: "disabled", indeterminate: "indeterminate" }, outputs: { change: "change", indeterminateChange: "indeterminateChange" }, viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }, { propertyName: "ripple", first: true, predicate: MatRipple, descendants: true }], usesInheritance: true, ngImport: i0 });
|
319 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatCheckboxBase, decorators: [{
|
320 | type: Directive
|
321 | }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { ariaLabel: [{
|
322 | type: Input,
|
323 | args: ['aria-label']
|
324 | }], ariaLabelledby: [{
|
325 | type: Input,
|
326 | args: ['aria-labelledby']
|
327 | }], ariaDescribedby: [{
|
328 | type: Input,
|
329 | args: ['aria-describedby']
|
330 | }], id: [{
|
331 | type: Input
|
332 | }], required: [{
|
333 | type: Input
|
334 | }], labelPosition: [{
|
335 | type: Input
|
336 | }], name: [{
|
337 | type: Input
|
338 | }], change: [{
|
339 | type: Output
|
340 | }], indeterminateChange: [{
|
341 | type: Output
|
342 | }], value: [{
|
343 | type: Input
|
344 | }], _inputElement: [{
|
345 | type: ViewChild,
|
346 | args: ['input']
|
347 | }], ripple: [{
|
348 | type: ViewChild,
|
349 | args: [MatRipple]
|
350 | }], checked: [{
|
351 | type: Input
|
352 | }], disabled: [{
|
353 | type: Input
|
354 | }], indeterminate: [{
|
355 | type: Input
|
356 | }] } });
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 | class MatCheckbox extends _MatCheckboxBase {
|
366 | constructor(elementRef, changeDetectorRef, _focusMonitor, ngZone, tabIndex, animationMode, options) {
|
367 | super('mat-checkbox-', elementRef, changeDetectorRef, ngZone, tabIndex, animationMode, options);
|
368 | this._focusMonitor = _focusMonitor;
|
369 | this._animationClasses = {
|
370 | uncheckedToChecked: 'mat-checkbox-anim-unchecked-checked',
|
371 | uncheckedToIndeterminate: 'mat-checkbox-anim-unchecked-indeterminate',
|
372 | checkedToUnchecked: 'mat-checkbox-anim-checked-unchecked',
|
373 | checkedToIndeterminate: 'mat-checkbox-anim-checked-indeterminate',
|
374 | indeterminateToChecked: 'mat-checkbox-anim-indeterminate-checked',
|
375 | indeterminateToUnchecked: 'mat-checkbox-anim-indeterminate-unchecked',
|
376 | };
|
377 | }
|
378 | _createChangeEvent(isChecked) {
|
379 | const event = new MatCheckboxChange();
|
380 | event.source = this;
|
381 | event.checked = isChecked;
|
382 | return event;
|
383 | }
|
384 | _getAnimationTargetElement() {
|
385 | return this._elementRef.nativeElement;
|
386 | }
|
387 | ngAfterViewInit() {
|
388 | super.ngAfterViewInit();
|
389 | this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {
|
390 | if (!focusOrigin) {
|
391 | this._onBlur();
|
392 | }
|
393 | });
|
394 | }
|
395 | ngOnDestroy() {
|
396 | this._focusMonitor.stopMonitoring(this._elementRef);
|
397 | }
|
398 | |
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 | _onInputClick(event) {
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 | event.stopPropagation();
|
414 | super._handleInputClick();
|
415 | }
|
416 |
|
417 | focus(origin, options) {
|
418 | if (origin) {
|
419 | this._focusMonitor.focusVia(this._inputElement, origin, options);
|
420 | }
|
421 | else {
|
422 | this._inputElement.nativeElement.focus(options);
|
423 | }
|
424 | }
|
425 | }
|
426 | MatCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckbox, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i0.NgZone }, { token: 'tabindex', attribute: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_CHECKBOX_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
427 | MatCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: MatCheckbox, selector: "mat-checkbox", inputs: { disableRipple: "disableRipple", color: "color", tabIndex: "tabIndex" }, host: { properties: { "id": "id", "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "class.mat-checkbox-indeterminate": "indeterminate", "class.mat-checkbox-checked": "checked", "class.mat-checkbox-disabled": "disabled", "class.mat-checkbox-label-before": "labelPosition == \"before\"", "class._mat-animation-noopable": "_animationMode === 'NoopAnimations'" }, classAttribute: "mat-checkbox" }, providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR], exportAs: ["matCheckbox"], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label>\n <span class=\"mat-checkbox-inner-container\"\n [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\">\n <input #input\n class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\"\n [id]=\"inputId\"\n [required]=\"required\"\n [checked]=\"checked\"\n [attr.value]=\"value\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [tabIndex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"_getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInteractionEvent($event)\"\n (click)=\"_onInputClick($event)\">\n <span matRipple class=\"mat-checkbox-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleRadius]=\"20\"\n [matRippleCentered]=\"true\"\n [matRippleAnimation]=\"{enterDuration: _animationMode === 'NoopAnimations' ? 0 : 150}\">\n <span class=\"mat-ripple-element mat-checkbox-persistent-ripple\"></span>\n </span>\n <span class=\"mat-checkbox-frame\"></span>\n <span class=\"mat-checkbox-background\">\n <svg version=\"1.1\"\n focusable=\"false\"\n class=\"mat-checkbox-checkmark\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <path class=\"mat-checkbox-checkmark-path\"\n fill=\"none\"\n stroke=\"white\"\n d=\"M4.1,12.7 9,17.6 20.3,6.3\"/>\n </svg>\n <!-- Element for rendering the indeterminate state checkbox. -->\n <span class=\"mat-checkbox-mixedmark\"></span>\n </span>\n </span>\n <span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\"> </span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-ripple{outline:solid 3px}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}"], dependencies: [{ kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i3.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
428 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckbox, decorators: [{
|
429 | type: Component,
|
430 | args: [{ selector: 'mat-checkbox', exportAs: 'matCheckbox', host: {
|
431 | 'class': 'mat-checkbox',
|
432 | '[id]': 'id',
|
433 | '[attr.tabindex]': 'null',
|
434 | '[attr.aria-label]': 'null',
|
435 | '[attr.aria-labelledby]': 'null',
|
436 | '[class.mat-checkbox-indeterminate]': 'indeterminate',
|
437 | '[class.mat-checkbox-checked]': 'checked',
|
438 | '[class.mat-checkbox-disabled]': 'disabled',
|
439 | '[class.mat-checkbox-label-before]': 'labelPosition == "before"',
|
440 | '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,
|
441 | }, providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR], inputs: ['disableRipple', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label>\n <span class=\"mat-checkbox-inner-container\"\n [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\">\n <input #input\n class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\"\n [id]=\"inputId\"\n [required]=\"required\"\n [checked]=\"checked\"\n [attr.value]=\"value\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [tabIndex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"_getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInteractionEvent($event)\"\n (click)=\"_onInputClick($event)\">\n <span matRipple class=\"mat-checkbox-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleRadius]=\"20\"\n [matRippleCentered]=\"true\"\n [matRippleAnimation]=\"{enterDuration: _animationMode === 'NoopAnimations' ? 0 : 150}\">\n <span class=\"mat-ripple-element mat-checkbox-persistent-ripple\"></span>\n </span>\n <span class=\"mat-checkbox-frame\"></span>\n <span class=\"mat-checkbox-background\">\n <svg version=\"1.1\"\n focusable=\"false\"\n class=\"mat-checkbox-checkmark\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <path class=\"mat-checkbox-checkmark-path\"\n fill=\"none\"\n stroke=\"white\"\n d=\"M4.1,12.7 9,17.6 20.3,6.3\"/>\n </svg>\n <!-- Element for rendering the indeterminate state checkbox. -->\n <span class=\"mat-checkbox-mixedmark\"></span>\n </span>\n </span>\n <span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\"> </span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-ripple{outline:solid 3px}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}"] }]
|
442 | }], ctorParameters: function () {
|
443 | return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
444 | type: Attribute,
|
445 | args: ['tabindex']
|
446 | }] }, { type: undefined, decorators: [{
|
447 | type: Optional
|
448 | }, {
|
449 | type: Inject,
|
450 | args: [ANIMATION_MODULE_TYPE]
|
451 | }] }, { type: undefined, decorators: [{
|
452 | type: Optional
|
453 | }, {
|
454 | type: Inject,
|
455 | args: [MAT_CHECKBOX_DEFAULT_OPTIONS]
|
456 | }] }];
|
457 | } });
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 | const MAT_CHECKBOX_REQUIRED_VALIDATOR = {
|
467 | provide: NG_VALIDATORS,
|
468 | useExisting: forwardRef(() => MatCheckboxRequiredValidator),
|
469 | multi: true,
|
470 | };
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 | class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {
|
477 | }
|
478 | MatCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
479 | MatCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: MatCheckboxRequiredValidator, selector: "mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]", providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
|
480 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckboxRequiredValidator, decorators: [{
|
481 | type: Directive,
|
482 | args: [{
|
483 | selector: `mat-checkbox[required][formControlName],
|
484 | mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,
|
485 | providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],
|
486 | }]
|
487 | }] });
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 | class _MatCheckboxRequiredValidatorModule {
|
498 | }
|
499 | _MatCheckboxRequiredValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
500 | _MatCheckboxRequiredValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.1", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, declarations: [MatCheckboxRequiredValidator], exports: [MatCheckboxRequiredValidator] });
|
501 | _MatCheckboxRequiredValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatCheckboxRequiredValidatorModule });
|
502 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, decorators: [{
|
503 | type: NgModule,
|
504 | args: [{
|
505 | exports: [MatCheckboxRequiredValidator],
|
506 | declarations: [MatCheckboxRequiredValidator],
|
507 | }]
|
508 | }] });
|
509 | class MatCheckboxModule {
|
510 | }
|
511 | MatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
512 | MatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.1", ngImport: i0, type: MatCheckboxModule, declarations: [MatCheckbox], imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule], exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule] });
|
513 | MatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckboxModule, imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule, MatCommonModule, _MatCheckboxRequiredValidatorModule] });
|
514 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatCheckboxModule, decorators: [{
|
515 | type: NgModule,
|
516 | args: [{
|
517 | imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule],
|
518 | exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],
|
519 | declarations: [MatCheckbox],
|
520 | }]
|
521 | }] });
|
522 |
|
523 |
|
524 |
|
525 |
|
526 |
|
527 |
|
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 | export { MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR, MAT_CHECKBOX_DEFAULT_OPTIONS, MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY, MAT_CHECKBOX_REQUIRED_VALIDATOR, MatCheckbox, MatCheckboxChange, MatCheckboxModule, MatCheckboxRequiredValidator, _MatCheckboxBase, _MatCheckboxRequiredValidatorModule };
|
544 |
|