source: trip-planner-front/node_modules/@angular/material/esm2015/datepicker/date-range-input.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 46.8 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Optional, ContentChild, ChangeDetectorRef, Self, ElementRef, Inject, } from '@angular/core';
9import { MatFormFieldControl, MatFormField, MAT_FORM_FIELD } from '@angular/material/form-field';
10import { DateAdapter } from '@angular/material/core';
11import { ControlContainer } from '@angular/forms';
12import { Subject, merge, Subscription } from 'rxjs';
13import { coerceBooleanProperty } from '@angular/cdk/coercion';
14import { MatStartDate, MatEndDate, MAT_DATE_RANGE_INPUT_PARENT, } from './date-range-input-parts';
15import { createMissingDateImplError } from './datepicker-errors';
16import { dateInputsHaveChanged } from './datepicker-input-base';
17let nextUniqueId = 0;
18export class MatDateRangeInput {
19 constructor(_changeDetectorRef, _elementRef, control, _dateAdapter, _formField) {
20 this._changeDetectorRef = _changeDetectorRef;
21 this._elementRef = _elementRef;
22 this._dateAdapter = _dateAdapter;
23 this._formField = _formField;
24 this._closedSubscription = Subscription.EMPTY;
25 /** Unique ID for the input. */
26 this.id = `mat-date-range-input-${nextUniqueId++}`;
27 /** Whether the control is focused. */
28 this.focused = false;
29 /** Name of the form control. */
30 this.controlType = 'mat-date-range-input';
31 this._groupDisabled = false;
32 /** Value for the `aria-describedby` attribute of the inputs. */
33 this._ariaDescribedBy = null;
34 /** Separator text to be shown between the inputs. */
35 this.separator = '–';
36 /** Start of the comparison range that should be shown in the calendar. */
37 this.comparisonStart = null;
38 /** End of the comparison range that should be shown in the calendar. */
39 this.comparisonEnd = null;
40 /** Emits when the input's state has changed. */
41 this.stateChanges = new Subject();
42 if (!_dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
43 throw createMissingDateImplError('DateAdapter');
44 }
45 // The datepicker module can be used both with MDC and non-MDC form fields. We have
46 // to conditionally add the MDC input class so that the range picker looks correctly.
47 if (_formField === null || _formField === void 0 ? void 0 : _formField._elementRef.nativeElement.classList.contains('mat-mdc-form-field')) {
48 const classList = _elementRef.nativeElement.classList;
49 classList.add('mat-mdc-input-element');
50 classList.add('mat-mdc-form-field-input-control');
51 }
52 // TODO(crisbeto): remove `as any` after #18206 lands.
53 this.ngControl = control;
54 }
55 /** Current value of the range input. */
56 get value() {
57 return this._model ? this._model.selection : null;
58 }
59 /** Whether the control's label should float. */
60 get shouldLabelFloat() {
61 return this.focused || !this.empty;
62 }
63 /**
64 * Implemented as a part of `MatFormFieldControl`.
65 * Set the placeholder attribute on `matStartDate` and `matEndDate`.
66 * @docs-private
67 */
68 get placeholder() {
69 var _a, _b;
70 const start = ((_a = this._startInput) === null || _a === void 0 ? void 0 : _a._getPlaceholder()) || '';
71 const end = ((_b = this._endInput) === null || _b === void 0 ? void 0 : _b._getPlaceholder()) || '';
72 return (start || end) ? `${start} ${this.separator} ${end}` : '';
73 }
74 /** The range picker that this input is associated with. */
75 get rangePicker() { return this._rangePicker; }
76 set rangePicker(rangePicker) {
77 if (rangePicker) {
78 this._model = rangePicker.registerInput(this);
79 this._rangePicker = rangePicker;
80 this._closedSubscription.unsubscribe();
81 this._closedSubscription = rangePicker.closedStream.subscribe(() => {
82 var _a, _b;
83 (_a = this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
84 (_b = this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
85 });
86 this._registerModel(this._model);
87 }
88 }
89 /** Whether the input is required. */
90 get required() { return !!this._required; }
91 set required(value) {
92 this._required = coerceBooleanProperty(value);
93 }
94 /** Function that can be used to filter out dates within the date range picker. */
95 get dateFilter() { return this._dateFilter; }
96 set dateFilter(value) {
97 const start = this._startInput;
98 const end = this._endInput;
99 const wasMatchingStart = start && start._matchesFilter(start.value);
100 const wasMatchingEnd = end && end._matchesFilter(start.value);
101 this._dateFilter = value;
102 if (start && start._matchesFilter(start.value) !== wasMatchingStart) {
103 start._validatorOnChange();
104 }
105 if (end && end._matchesFilter(end.value) !== wasMatchingEnd) {
106 end._validatorOnChange();
107 }
108 }
109 /** The minimum valid date. */
110 get min() { return this._min; }
111 set min(value) {
112 const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
113 if (!this._dateAdapter.sameDate(validValue, this._min)) {
114 this._min = validValue;
115 this._revalidate();
116 }
117 }
118 /** The maximum valid date. */
119 get max() { return this._max; }
120 set max(value) {
121 const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
122 if (!this._dateAdapter.sameDate(validValue, this._max)) {
123 this._max = validValue;
124 this._revalidate();
125 }
126 }
127 /** Whether the input is disabled. */
128 get disabled() {
129 return (this._startInput && this._endInput) ?
130 (this._startInput.disabled && this._endInput.disabled) :
131 this._groupDisabled;
132 }
133 set disabled(value) {
134 const newValue = coerceBooleanProperty(value);
135 if (newValue !== this._groupDisabled) {
136 this._groupDisabled = newValue;
137 this.stateChanges.next(undefined);
138 }
139 }
140 /** Whether the input is in an error state. */
141 get errorState() {
142 if (this._startInput && this._endInput) {
143 return this._startInput.errorState || this._endInput.errorState;
144 }
145 return false;
146 }
147 /** Whether the datepicker input is empty. */
148 get empty() {
149 const startEmpty = this._startInput ? this._startInput.isEmpty() : false;
150 const endEmpty = this._endInput ? this._endInput.isEmpty() : false;
151 return startEmpty && endEmpty;
152 }
153 /**
154 * Implemented as a part of `MatFormFieldControl`.
155 * @docs-private
156 */
157 setDescribedByIds(ids) {
158 this._ariaDescribedBy = ids.length ? ids.join(' ') : null;
159 }
160 /**
161 * Implemented as a part of `MatFormFieldControl`.
162 * @docs-private
163 */
164 onContainerClick() {
165 if (!this.focused && !this.disabled) {
166 if (!this._model || !this._model.selection.start) {
167 this._startInput.focus();
168 }
169 else {
170 this._endInput.focus();
171 }
172 }
173 }
174 ngAfterContentInit() {
175 if (typeof ngDevMode === 'undefined' || ngDevMode) {
176 if (!this._startInput) {
177 throw Error('mat-date-range-input must contain a matStartDate input');
178 }
179 if (!this._endInput) {
180 throw Error('mat-date-range-input must contain a matEndDate input');
181 }
182 }
183 if (this._model) {
184 this._registerModel(this._model);
185 }
186 // We don't need to unsubscribe from this, because we
187 // know that the input streams will be completed on destroy.
188 merge(this._startInput.stateChanges, this._endInput.stateChanges).subscribe(() => {
189 this.stateChanges.next(undefined);
190 });
191 }
192 ngOnChanges(changes) {
193 if (dateInputsHaveChanged(changes, this._dateAdapter)) {
194 this.stateChanges.next(undefined);
195 }
196 }
197 ngOnDestroy() {
198 this._closedSubscription.unsubscribe();
199 this.stateChanges.complete();
200 }
201 /** Gets the date at which the calendar should start. */
202 getStartValue() {
203 return this.value ? this.value.start : null;
204 }
205 /** Gets the input's theme palette. */
206 getThemePalette() {
207 return this._formField ? this._formField.color : undefined;
208 }
209 /** Gets the element to which the calendar overlay should be attached. */
210 getConnectedOverlayOrigin() {
211 return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
212 }
213 /** Gets the ID of an element that should be used a description for the calendar overlay. */
214 getOverlayLabelId() {
215 return this._formField ? this._formField.getLabelId() : null;
216 }
217 /** Gets the value that is used to mirror the state input. */
218 _getInputMirrorValue() {
219 return this._startInput ? this._startInput.getMirrorValue() : '';
220 }
221 /** Whether the input placeholders should be hidden. */
222 _shouldHidePlaceholders() {
223 return this._startInput ? !this._startInput.isEmpty() : false;
224 }
225 /** Handles the value in one of the child inputs changing. */
226 _handleChildValueChange() {
227 this.stateChanges.next(undefined);
228 this._changeDetectorRef.markForCheck();
229 }
230 /** Opens the date range picker associated with the input. */
231 _openDatepicker() {
232 if (this._rangePicker) {
233 this._rangePicker.open();
234 }
235 }
236 /** Whether the separate text should be hidden. */
237 _shouldHideSeparator() {
238 return (!this._formField || (this._formField.getLabelId() &&
239 !this._formField._shouldLabelFloat())) && this.empty;
240 }
241 /** Gets the value for the `aria-labelledby` attribute of the inputs. */
242 _getAriaLabelledby() {
243 const formField = this._formField;
244 return formField && formField._hasFloatingLabel() ? formField._labelId : null;
245 }
246 /** Updates the focused state of the range input. */
247 _updateFocus(origin) {
248 this.focused = origin !== null;
249 this.stateChanges.next();
250 }
251 /** Re-runs the validators on the start/end inputs. */
252 _revalidate() {
253 if (this._startInput) {
254 this._startInput._validatorOnChange();
255 }
256 if (this._endInput) {
257 this._endInput._validatorOnChange();
258 }
259 }
260 /** Registers the current date selection model with the start/end inputs. */
261 _registerModel(model) {
262 if (this._startInput) {
263 this._startInput._registerModel(model);
264 }
265 if (this._endInput) {
266 this._endInput._registerModel(model);
267 }
268 }
269}
270MatDateRangeInput.decorators = [
271 { type: Component, args: [{
272 selector: 'mat-date-range-input',
273 template: "<div\n class=\"mat-date-range-input-container\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"_updateFocus($event)\">\n <div class=\"mat-date-range-input-start-wrapper\">\n <ng-content select=\"input[matStartDate]\"></ng-content>\n <span\n class=\"mat-date-range-input-mirror\"\n aria-hidden=\"true\">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class=\"mat-date-range-input-separator\"\n [class.mat-date-range-input-separator-hidden]=\"_shouldHideSeparator()\">{{separator}}</span>\n\n <div class=\"mat-date-range-input-end-wrapper\">\n <ng-content select=\"input[matEndDate]\"></ng-content>\n </div>\n</div>\n\n",
274 exportAs: 'matDateRangeInput',
275 host: {
276 'class': 'mat-date-range-input',
277 '[class.mat-date-range-input-hide-placeholders]': '_shouldHidePlaceholders()',
278 '[class.mat-date-range-input-required]': 'required',
279 '[attr.id]': 'null',
280 'role': 'group',
281 '[attr.aria-labelledby]': '_getAriaLabelledby()',
282 '[attr.aria-describedby]': '_ariaDescribedBy',
283 // Used by the test harness to tie this input to its calendar. We can't depend on
284 // `aria-owns` for this, because it's only defined while the calendar is open.
285 '[attr.data-mat-calendar]': 'rangePicker ? rangePicker.id : null',
286 },
287 changeDetection: ChangeDetectionStrategy.OnPush,
288 encapsulation: ViewEncapsulation.None,
289 providers: [
290 { provide: MatFormFieldControl, useExisting: MatDateRangeInput },
291 { provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },
292 ],
293 styles: [".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"]
294 },] }
295];
296MatDateRangeInput.ctorParameters = () => [
297 { type: ChangeDetectorRef },
298 { type: ElementRef },
299 { type: ControlContainer, decorators: [{ type: Optional }, { type: Self }] },
300 { type: DateAdapter, decorators: [{ type: Optional }] },
301 { type: MatFormField, decorators: [{ type: Optional }, { type: Inject, args: [MAT_FORM_FIELD,] }] }
302];
303MatDateRangeInput.propDecorators = {
304 rangePicker: [{ type: Input }],
305 required: [{ type: Input }],
306 dateFilter: [{ type: Input }],
307 min: [{ type: Input }],
308 max: [{ type: Input }],
309 disabled: [{ type: Input }],
310 separator: [{ type: Input }],
311 comparisonStart: [{ type: Input }],
312 comparisonEnd: [{ type: Input }],
313 _startInput: [{ type: ContentChild, args: [MatStartDate,] }],
314 _endInput: [{ type: ContentChild, args: [MatEndDate,] }]
315};
316//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1yYW5nZS1pbnB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9kYXRlcGlja2VyL2RhdGUtcmFuZ2UtaW5wdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUNMLFNBQVMsRUFDVCx1QkFBdUIsRUFDdkIsaUJBQWlCLEVBQ2pCLEtBQUssRUFDTCxRQUFRLEVBRVIsWUFBWSxFQUVaLGlCQUFpQixFQUNqQixJQUFJLEVBQ0osVUFBVSxFQUNWLE1BQU0sR0FHUCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUMsbUJBQW1CLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBQyxNQUFNLDhCQUE4QixDQUFDO0FBQy9GLE9BQU8sRUFBZSxXQUFXLEVBQUMsTUFBTSx3QkFBd0IsQ0FBQztBQUNqRSxPQUFPLEVBQVksZ0JBQWdCLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUMzRCxPQUFPLEVBQUMsT0FBTyxFQUFFLEtBQUssRUFBRSxZQU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