1 | import * as i3 from '@angular/cdk/observers';
|
2 | import { ObserversModule } from '@angular/cdk/observers';
|
3 | import * as i0 from '@angular/core';
|
4 | import { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Inject, Optional, ViewChild, NgModule } from '@angular/core';
|
5 | import * as i2 from '@angular/material/core';
|
6 | import { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRippleModule, MatCommonModule } from '@angular/material/core';
|
7 | import * as i1 from '@angular/cdk/a11y';
|
8 | import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
9 | import { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';
|
10 | import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | const MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = new InjectionToken('mat-slide-toggle-default-options', {
|
21 | providedIn: 'root',
|
22 | factory: () => ({ disableToggleValue: false }),
|
23 | });
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | let nextUniqueId = 0;
|
34 |
|
35 | const MAT_SLIDE_TOGGLE_VALUE_ACCESSOR = {
|
36 | provide: NG_VALUE_ACCESSOR,
|
37 | useExisting: forwardRef(() => MatSlideToggle),
|
38 | multi: true,
|
39 | };
|
40 |
|
41 | class MatSlideToggleChange {
|
42 | constructor(
|
43 | /** The source MatSlideToggle of the event. */
|
44 | source,
|
45 | /** The new `checked` value of the MatSlideToggle. */
|
46 | checked) {
|
47 | this.source = source;
|
48 | this.checked = checked;
|
49 | }
|
50 | }
|
51 |
|
52 |
|
53 | const _MatSlideToggleMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {
|
54 | constructor(_elementRef) {
|
55 | this._elementRef = _elementRef;
|
56 | }
|
57 | }))));
|
58 | class _MatSlideToggleBase extends _MatSlideToggleMixinBase {
|
59 | constructor(elementRef, _focusMonitor, _changeDetectorRef, tabIndex, defaults, animationMode, idPrefix) {
|
60 | super(elementRef);
|
61 | this._focusMonitor = _focusMonitor;
|
62 | this._changeDetectorRef = _changeDetectorRef;
|
63 | this.defaults = defaults;
|
64 | this._onChange = (_) => { };
|
65 | this._onTouched = () => { };
|
66 | this._required = false;
|
67 | this._checked = false;
|
68 |
|
69 | this.name = null;
|
70 |
|
71 | this.labelPosition = 'after';
|
72 |
|
73 | this.ariaLabel = null;
|
74 |
|
75 | this.ariaLabelledby = null;
|
76 |
|
77 | this.change = new EventEmitter();
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 | this.toggleChange = new EventEmitter();
|
84 | this.tabIndex = parseInt(tabIndex) || 0;
|
85 | this.color = this.defaultColor = defaults.color || 'accent';
|
86 | this._noopAnimations = animationMode === 'NoopAnimations';
|
87 | this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;
|
88 | }
|
89 |
|
90 | get required() {
|
91 | return this._required;
|
92 | }
|
93 | set required(value) {
|
94 | this._required = coerceBooleanProperty(value);
|
95 | }
|
96 |
|
97 | get checked() {
|
98 | return this._checked;
|
99 | }
|
100 | set checked(value) {
|
101 | this._checked = coerceBooleanProperty(value);
|
102 | this._changeDetectorRef.markForCheck();
|
103 | }
|
104 |
|
105 | get inputId() {
|
106 | return `${this.id || this._uniqueId}-input`;
|
107 | }
|
108 | ngAfterContentInit() {
|
109 | this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {
|
110 | if (focusOrigin === 'keyboard' || focusOrigin === 'program') {
|
111 | this._focused = true;
|
112 | }
|
113 | else if (!focusOrigin) {
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 | Promise.resolve().then(() => {
|
120 | this._focused = false;
|
121 | this._onTouched();
|
122 | this._changeDetectorRef.markForCheck();
|
123 | });
|
124 | }
|
125 | });
|
126 | }
|
127 | ngOnDestroy() {
|
128 | this._focusMonitor.stopMonitoring(this._elementRef);
|
129 | }
|
130 |
|
131 | writeValue(value) {
|
132 | this.checked = !!value;
|
133 | }
|
134 |
|
135 | registerOnChange(fn) {
|
136 | this._onChange = fn;
|
137 | }
|
138 |
|
139 | registerOnTouched(fn) {
|
140 | this._onTouched = fn;
|
141 | }
|
142 |
|
143 | setDisabledState(isDisabled) {
|
144 | this.disabled = isDisabled;
|
145 | this._changeDetectorRef.markForCheck();
|
146 | }
|
147 |
|
148 | toggle() {
|
149 | this.checked = !this.checked;
|
150 | this._onChange(this.checked);
|
151 | }
|
152 | |
153 |
|
154 |
|
155 | _emitChangeEvent() {
|
156 | this._onChange(this.checked);
|
157 | this.change.emit(this._createChangeEvent(this.checked));
|
158 | }
|
159 | }
|
160 | _MatSlideToggleBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatSlideToggleBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
161 | _MatSlideToggleBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: _MatSlideToggleBase, inputs: { name: "name", id: "id", labelPosition: "labelPosition", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], required: "required", checked: "checked" }, outputs: { change: "change", toggleChange: "toggleChange" }, usesInheritance: true, ngImport: i0 });
|
162 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatSlideToggleBase, decorators: [{
|
163 | type: Directive
|
164 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { name: [{
|
165 | type: Input
|
166 | }], id: [{
|
167 | type: Input
|
168 | }], labelPosition: [{
|
169 | type: Input
|
170 | }], ariaLabel: [{
|
171 | type: Input,
|
172 | args: ['aria-label']
|
173 | }], ariaLabelledby: [{
|
174 | type: Input,
|
175 | args: ['aria-labelledby']
|
176 | }], ariaDescribedby: [{
|
177 | type: Input,
|
178 | args: ['aria-describedby']
|
179 | }], required: [{
|
180 | type: Input
|
181 | }], checked: [{
|
182 | type: Input
|
183 | }], change: [{
|
184 | type: Output
|
185 | }], toggleChange: [{
|
186 | type: Output
|
187 | }] } });
|
188 |
|
189 | class MatSlideToggle extends _MatSlideToggleBase {
|
190 | constructor(elementRef, focusMonitor, changeDetectorRef, tabIndex, defaults, animationMode) {
|
191 | super(elementRef, focusMonitor, changeDetectorRef, tabIndex, defaults, animationMode, 'mat-slide-toggle-');
|
192 | }
|
193 | _createChangeEvent(isChecked) {
|
194 | return new MatSlideToggleChange(this, isChecked);
|
195 | }
|
196 |
|
197 | _onChangeEvent(event) {
|
198 |
|
199 |
|
200 |
|
201 | event.stopPropagation();
|
202 | this.toggleChange.emit();
|
203 |
|
204 |
|
205 |
|
206 | if (this.defaults.disableToggleValue) {
|
207 | this._inputElement.nativeElement.checked = this.checked;
|
208 | return;
|
209 | }
|
210 |
|
211 | this.checked = this._inputElement.nativeElement.checked;
|
212 |
|
213 |
|
214 | this._emitChangeEvent();
|
215 | }
|
216 |
|
217 | _onInputClick(event) {
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 | event.stopPropagation();
|
226 | }
|
227 |
|
228 | focus(options, origin) {
|
229 | if (origin) {
|
230 | this._focusMonitor.focusVia(this._inputElement, origin, options);
|
231 | }
|
232 | else {
|
233 | this._inputElement.nativeElement.focus(options);
|
234 | }
|
235 | }
|
236 |
|
237 | _onLabelTextChange() {
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 | this._changeDetectorRef.detectChanges();
|
244 | }
|
245 | }
|
246 | MatSlideToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggle, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }, { token: MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
247 | MatSlideToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: { disabled: "disabled", disableRipple: "disableRipple", color: "color", tabIndex: "tabIndex" }, host: { properties: { "id": "id", "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.name": "null", "class.mat-checked": "checked", "class.mat-disabled": "disabled", "class.mat-slide-toggle-label-before": "labelPosition == \"before\"", "class._mat-animation-noopable": "_noopAnimations" }, classAttribute: "mat-slide-toggle" }, providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }], exportAs: ["matSlideToggle"], usesInheritance: true, ngImport: i0, template: "<label [attr.for]=\"inputId\" class=\"mat-slide-toggle-label\" #label>\n <span class=\"mat-slide-toggle-bar\"\n [class.mat-slide-toggle-bar-no-side-margin]=\"!labelContent.textContent || !labelContent.textContent.trim()\">\n\n <input #input class=\"mat-slide-toggle-input cdk-visually-hidden\" type=\"checkbox\"\n role=\"switch\"\n [id]=\"inputId\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onChangeEvent($event)\"\n (click)=\"_onInputClick($event)\">\n\n <span class=\"mat-slide-toggle-thumb-container\">\n <span class=\"mat-slide-toggle-thumb\"></span>\n <span class=\"mat-slide-toggle-ripple mat-focus-indicator\" mat-ripple\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-slide-toggle-persistent-ripple\"></span>\n </span>\n </span>\n\n </span>\n\n <span class=\"mat-slide-toggle-content\" #labelContent (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: [".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}"], 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 });
|
248 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggle, decorators: [{
|
249 | type: Component,
|
250 | args: [{ selector: 'mat-slide-toggle', exportAs: 'matSlideToggle', host: {
|
251 | 'class': 'mat-slide-toggle',
|
252 | '[id]': 'id',
|
253 |
|
254 | '[attr.tabindex]': 'null',
|
255 | '[attr.aria-label]': 'null',
|
256 | '[attr.aria-labelledby]': 'null',
|
257 | '[attr.name]': 'null',
|
258 | '[class.mat-checked]': 'checked',
|
259 | '[class.mat-disabled]': 'disabled',
|
260 | '[class.mat-slide-toggle-label-before]': 'labelPosition == "before"',
|
261 | '[class._mat-animation-noopable]': '_noopAnimations',
|
262 | }, providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR], inputs: ['disabled', 'disableRipple', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [attr.for]=\"inputId\" class=\"mat-slide-toggle-label\" #label>\n <span class=\"mat-slide-toggle-bar\"\n [class.mat-slide-toggle-bar-no-side-margin]=\"!labelContent.textContent || !labelContent.textContent.trim()\">\n\n <input #input class=\"mat-slide-toggle-input cdk-visually-hidden\" type=\"checkbox\"\n role=\"switch\"\n [id]=\"inputId\"\n [required]=\"required\"\n [tabIndex]=\"tabIndex\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onChangeEvent($event)\"\n (click)=\"_onInputClick($event)\">\n\n <span class=\"mat-slide-toggle-thumb-container\">\n <span class=\"mat-slide-toggle-thumb\"></span>\n <span class=\"mat-slide-toggle-ripple mat-focus-indicator\" mat-ripple\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-slide-toggle-persistent-ripple\"></span>\n </span>\n </span>\n\n </span>\n\n <span class=\"mat-slide-toggle-content\" #labelContent (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: [".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}"] }]
|
263 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
264 | type: Attribute,
|
265 | args: ['tabindex']
|
266 | }] }, { type: undefined, decorators: [{
|
267 | type: Inject,
|
268 | args: [MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS]
|
269 | }] }, { type: undefined, decorators: [{
|
270 | type: Optional
|
271 | }, {
|
272 | type: Inject,
|
273 | args: [ANIMATION_MODULE_TYPE]
|
274 | }] }]; }, propDecorators: { _inputElement: [{
|
275 | type: ViewChild,
|
276 | args: ['input']
|
277 | }] } });
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 | const MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR = {
|
287 | provide: NG_VALIDATORS,
|
288 | useExisting: forwardRef(() => MatSlideToggleRequiredValidator),
|
289 | multi: true,
|
290 | };
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 | class MatSlideToggleRequiredValidator extends CheckboxRequiredValidator {
|
300 | }
|
301 | MatSlideToggleRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggleRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
302 | MatSlideToggleRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: MatSlideToggleRequiredValidator, selector: "mat-slide-toggle[required][formControlName],\n mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]", providers: [MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
|
303 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggleRequiredValidator, decorators: [{
|
304 | type: Directive,
|
305 | args: [{
|
306 | selector: `mat-slide-toggle[required][formControlName],
|
307 | mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]`,
|
308 | providers: [MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR],
|
309 | }]
|
310 | }] });
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 | class _MatSlideToggleRequiredValidatorModule {
|
321 | }
|
322 | _MatSlideToggleRequiredValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
323 | _MatSlideToggleRequiredValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.1", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, declarations: [MatSlideToggleRequiredValidator], exports: [MatSlideToggleRequiredValidator] });
|
324 | _MatSlideToggleRequiredValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule });
|
325 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, decorators: [{
|
326 | type: NgModule,
|
327 | args: [{
|
328 | exports: [MatSlideToggleRequiredValidator],
|
329 | declarations: [MatSlideToggleRequiredValidator],
|
330 | }]
|
331 | }] });
|
332 | class MatSlideToggleModule {
|
333 | }
|
334 | MatSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
335 | MatSlideToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggleModule, declarations: [MatSlideToggle], imports: [_MatSlideToggleRequiredValidatorModule, MatRippleModule,
|
336 | MatCommonModule,
|
337 | ObserversModule], exports: [_MatSlideToggleRequiredValidatorModule, MatSlideToggle, MatCommonModule] });
|
338 | MatSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggleModule, imports: [_MatSlideToggleRequiredValidatorModule,
|
339 | MatRippleModule,
|
340 | MatCommonModule,
|
341 | ObserversModule, _MatSlideToggleRequiredValidatorModule, MatCommonModule] });
|
342 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: MatSlideToggleModule, decorators: [{
|
343 | type: NgModule,
|
344 | args: [{
|
345 | imports: [
|
346 | _MatSlideToggleRequiredValidatorModule,
|
347 | MatRippleModule,
|
348 | MatCommonModule,
|
349 | ObserversModule,
|
350 | ],
|
351 | exports: [_MatSlideToggleRequiredValidatorModule, MatSlideToggle, MatCommonModule],
|
352 | declarations: [MatSlideToggle],
|
353 | }]
|
354 | }] });
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 | export { MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS, MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR, MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, MatSlideToggle, MatSlideToggleChange, MatSlideToggleModule, MatSlideToggleRequiredValidator, _MatSlideToggleBase, _MatSlideToggleRequiredValidatorModule };
|
377 |
|