source: trip-planner-front/node_modules/@angular/material/esm2015/chips/chip.js

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

initial commit

  • Property mode set to 100644
File size: 48.3 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 { coerceBooleanProperty } from '@angular/cdk/coercion';
9import { BACKSPACE, DELETE, SPACE } from '@angular/cdk/keycodes';
10import { Platform } from '@angular/cdk/platform';
11import { DOCUMENT } from '@angular/common';
12import { Attribute, ChangeDetectorRef, ContentChild, Directive, ElementRef, EventEmitter, Inject, InjectionToken, Input, NgZone, Optional, Output, } from '@angular/core';
13import { MAT_RIPPLE_GLOBAL_OPTIONS, mixinColor, mixinDisableRipple, mixinTabIndex, RippleRenderer, } from '@angular/material/core';
14import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
15import { Subject } from 'rxjs';
16import { take } from 'rxjs/operators';
17/** Event object emitted by MatChip when selected or deselected. */
18export class MatChipSelectionChange {
19 constructor(
20 /** Reference to the chip that emitted the event. */
21 source,
22 /** Whether the chip that emitted the event is selected. */
23 selected,
24 /** Whether the selection change was a result of a user interaction. */
25 isUserInput = false) {
26 this.source = source;
27 this.selected = selected;
28 this.isUserInput = isUserInput;
29 }
30}
31/**
32 * Injection token that can be used to reference instances of `MatChipRemove`. It serves as
33 * alternative token to the actual `MatChipRemove` class which could cause unnecessary
34 * retention of the class and its directive metadata.
35 */
36export const MAT_CHIP_REMOVE = new InjectionToken('MatChipRemove');
37/**
38 * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
39 * alternative token to the actual `MatChipAvatar` class which could cause unnecessary
40 * retention of the class and its directive metadata.
41 */
42export const MAT_CHIP_AVATAR = new InjectionToken('MatChipAvatar');
43/**
44 * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as
45 * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary
46 * retention of the class and its directive metadata.
47 */
48export const MAT_CHIP_TRAILING_ICON = new InjectionToken('MatChipTrailingIcon');
49// Boilerplate for applying mixins to MatChip.
50/** @docs-private */
51class MatChipBase {
52 constructor(_elementRef) {
53 this._elementRef = _elementRef;
54 }
55}
56const _MatChipMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(MatChipBase), 'primary'), -1);
57/**
58 * Dummy directive to add CSS class to chip avatar.
59 * @docs-private
60 */
61export class MatChipAvatar {
62}
63MatChipAvatar.decorators = [
64 { type: Directive, args: [{
65 selector: 'mat-chip-avatar, [matChipAvatar]',
66 host: { 'class': 'mat-chip-avatar' },
67 providers: [{ provide: MAT_CHIP_AVATAR, useExisting: MatChipAvatar }]
68 },] }
69];
70/**
71 * Dummy directive to add CSS class to chip trailing icon.
72 * @docs-private
73 */
74export class MatChipTrailingIcon {
75}
76MatChipTrailingIcon.decorators = [
77 { type: Directive, args: [{
78 selector: 'mat-chip-trailing-icon, [matChipTrailingIcon]',
79 host: { 'class': 'mat-chip-trailing-icon' },
80 providers: [{ provide: MAT_CHIP_TRAILING_ICON, useExisting: MatChipTrailingIcon }],
81 },] }
82];
83/**
84 * Material design styled Chip component. Used inside the MatChipList component.
85 */
86export class MatChip extends _MatChipMixinBase {
87 constructor(elementRef, _ngZone, platform, globalRippleOptions, _changeDetectorRef, _document, animationMode, tabIndex) {
88 super(elementRef);
89 this._ngZone = _ngZone;
90 this._changeDetectorRef = _changeDetectorRef;
91 /** Whether the chip has focus. */
92 this._hasFocus = false;
93 /** Whether the chip list is selectable */
94 this.chipListSelectable = true;
95 /** Whether the chip list is in multi-selection mode. */
96 this._chipListMultiple = false;
97 /** Whether the chip list as a whole is disabled. */
98 this._chipListDisabled = false;
99 this._selected = false;
100 this._selectable = true;
101 this._disabled = false;
102 this._removable = true;
103 /** Emits when the chip is focused. */
104 this._onFocus = new Subject();
105 /** Emits when the chip is blured. */
106 this._onBlur = new Subject();
107 /** Emitted when the chip is selected or deselected. */
108 this.selectionChange = new EventEmitter();
109 /** Emitted when the chip is destroyed. */
110 this.destroyed = new EventEmitter();
111 /** Emitted when a chip is to be removed. */
112 this.removed = new EventEmitter();
113 this._addHostClassName();
114 // Dynamically create the ripple target, append it within the chip, and use it as the
115 // chip's ripple target. Adding the class '.mat-chip-ripple' ensures that it will have
116 // the proper styles.
117 this._chipRippleTarget = _document.createElement('div');
118 this._chipRippleTarget.classList.add('mat-chip-ripple');
119 this._elementRef.nativeElement.appendChild(this._chipRippleTarget);
120 this._chipRipple = new RippleRenderer(this, _ngZone, this._chipRippleTarget, platform);
121 this._chipRipple.setupTriggerEvents(elementRef);
122 this.rippleConfig = globalRippleOptions || {};
123 this._animationsDisabled = animationMode === 'NoopAnimations';
124 this.tabIndex = tabIndex != null ? (parseInt(tabIndex) || -1) : -1;
125 }
126 /**
127 * Whether ripples are disabled on interaction
128 * @docs-private
129 */
130 get rippleDisabled() {
131 return this.disabled || this.disableRipple || this._animationsDisabled ||
132 !!this.rippleConfig.disabled;
133 }
134 /** Whether the chip is selected. */
135 get selected() { return this._selected; }
136 set selected(value) {
137 const coercedValue = coerceBooleanProperty(value);
138 if (coercedValue !== this._selected) {
139 this._selected = coercedValue;
140 this._dispatchSelectionChange();
141 }
142 }
143 /** The value of the chip. Defaults to the content inside `<mat-chip>` tags. */
144 get value() {
145 return this._value !== undefined
146 ? this._value
147 : this._elementRef.nativeElement.textContent;
148 }
149 set value(value) { this._value = value; }
150 /**
151 * Whether or not the chip is selectable. When a chip is not selectable,
152 * changes to its selected state are always ignored. By default a chip is
153 * selectable, and it becomes non-selectable if its parent chip list is
154 * not selectable.
155 */
156 get selectable() { return this._selectable && this.chipListSelectable; }
157 set selectable(value) {
158 this._selectable = coerceBooleanProperty(value);
159 }
160 /** Whether the chip is disabled. */
161 get disabled() { return this._chipListDisabled || this._disabled; }
162 set disabled(value) {
163 this._disabled = coerceBooleanProperty(value);
164 }
165 /**
166 * Determines whether or not the chip displays the remove styling and emits (removed) events.
167 */
168 get removable() { return this._removable; }
169 set removable(value) {
170 this._removable = coerceBooleanProperty(value);
171 }
172 /** The ARIA selected applied to the chip. */
173 get ariaSelected() {
174 // Remove the `aria-selected` when the chip is deselected in single-selection mode, because
175 // it adds noise to NVDA users where "not selected" will be read out for each chip.
176 return this.selectable && (this._chipListMultiple || this.selected) ?
177 this.selected.toString() : null;
178 }
179 _addHostClassName() {
180 const basicChipAttrName = 'mat-basic-chip';
181 const element = this._elementRef.nativeElement;
182 if (element.hasAttribute(basicChipAttrName) ||
183 element.tagName.toLowerCase() === basicChipAttrName) {
184 element.classList.add(basicChipAttrName);
185 return;
186 }
187 else {
188 element.classList.add('mat-standard-chip');
189 }
190 }
191 ngOnDestroy() {
192 this.destroyed.emit({ chip: this });
193 this._chipRipple._removeTriggerEvents();
194 }
195 /** Selects the chip. */
196 select() {
197 if (!this._selected) {
198 this._selected = true;
199 this._dispatchSelectionChange();
200 this._changeDetectorRef.markForCheck();
201 }
202 }
203 /** Deselects the chip. */
204 deselect() {
205 if (this._selected) {
206 this._selected = false;
207 this._dispatchSelectionChange();
208 this._changeDetectorRef.markForCheck();
209 }
210 }
211 /** Select this chip and emit selected event */
212 selectViaInteraction() {
213 if (!this._selected) {
214 this._selected = true;
215 this._dispatchSelectionChange(true);
216 this._changeDetectorRef.markForCheck();
217 }
218 }
219 /** Toggles the current selected state of this chip. */
220 toggleSelected(isUserInput = false) {
221 this._selected = !this.selected;
222 this._dispatchSelectionChange(isUserInput);
223 this._changeDetectorRef.markForCheck();
224 return this.selected;
225 }
226 /** Allows for programmatic focusing of the chip. */
227 focus() {
228 if (!this._hasFocus) {
229 this._elementRef.nativeElement.focus();
230 this._onFocus.next({ chip: this });
231 }
232 this._hasFocus = true;
233 }
234 /**
235 * Allows for programmatic removal of the chip. Called by the MatChipList when the DELETE or
236 * BACKSPACE keys are pressed.
237 *
238 * Informs any listeners of the removal request. Does not remove the chip from the DOM.
239 */
240 remove() {
241 if (this.removable) {
242 this.removed.emit({ chip: this });
243 }
244 }
245 /** Handles click events on the chip. */
246 _handleClick(event) {
247 if (this.disabled) {
248 event.preventDefault();
249 }
250 else {
251 event.stopPropagation();
252 }
253 }
254 /** Handle custom key presses. */
255 _handleKeydown(event) {
256 if (this.disabled) {
257 return;
258 }
259 switch (event.keyCode) {
260 case DELETE:
261 case BACKSPACE:
262 // If we are removable, remove the focused chip
263 this.remove();
264 // Always prevent so page navigation does not occur
265 event.preventDefault();
266 break;
267 case SPACE:
268 // If we are selectable, toggle the focused chip
269 if (this.selectable) {
270 this.toggleSelected(true);
271 }
272 // Always prevent space from scrolling the page since the list has focus
273 event.preventDefault();
274 break;
275 }
276 }
277 _blur() {
278 // When animations are enabled, Angular may end up removing the chip from the DOM a little
279 // earlier than usual, causing it to be blurred and throwing off the logic in the chip list
280 // that moves focus not the next item. To work around the issue, we defer marking the chip
281 // as not focused until the next time the zone stabilizes.
282 this._ngZone.onStable
283 .pipe(take(1))
284 .subscribe(() => {
285 this._ngZone.run(() => {
286 this._hasFocus = false;
287 this._onBlur.next({ chip: this });
288 });
289 });
290 }
291 _dispatchSelectionChange(isUserInput = false) {
292 this.selectionChange.emit({
293 source: this,
294 isUserInput,
295 selected: this._selected
296 });
297 }
298}
299MatChip.decorators = [
300 { type: Directive, args: [{
301 selector: `mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]`,
302 inputs: ['color', 'disableRipple', 'tabIndex'],
303 exportAs: 'matChip',
304 host: {
305 'class': 'mat-chip mat-focus-indicator',
306 '[attr.tabindex]': 'disabled ? null : tabIndex',
307 'role': 'option',
308 '[class.mat-chip-selected]': 'selected',
309 '[class.mat-chip-with-avatar]': 'avatar',
310 '[class.mat-chip-with-trailing-icon]': 'trailingIcon || removeIcon',
311 '[class.mat-chip-disabled]': 'disabled',
312 '[class._mat-animation-noopable]': '_animationsDisabled',
313 '[attr.disabled]': 'disabled || null',
314 '[attr.aria-disabled]': 'disabled.toString()',
315 '[attr.aria-selected]': 'ariaSelected',
316 '(click)': '_handleClick($event)',
317 '(keydown)': '_handleKeydown($event)',
318 '(focus)': 'focus()',
319 '(blur)': '_blur()',
320 },
321 },] }
322];
323MatChip.ctorParameters = () => [
324 { type: ElementRef },
325 { type: NgZone },
326 { type: Platform },
327 { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_RIPPLE_GLOBAL_OPTIONS,] }] },
328 { type: ChangeDetectorRef },
329 { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
330 { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },
331 { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] }
332];
333MatChip.propDecorators = {
334 avatar: [{ type: ContentChild, args: [MAT_CHIP_AVATAR,] }],
335 trailingIcon: [{ type: ContentChild, args: [MAT_CHIP_TRAILING_ICON,] }],
336 removeIcon: [{ type: ContentChild, args: [MAT_CHIP_REMOVE,] }],
337 selected: [{ type: Input }],
338 value: [{ type: Input }],
339 selectable: [{ type: Input }],
340 disabled: [{ type: Input }],
341 removable: [{ type: Input }],
342 selectionChange: [{ type: Output }],
343 destroyed: [{ type: Output }],
344 removed: [{ type: Output }]
345};
346/**
347 * Applies proper (click) support and adds styling for use with the Material Design "cancel" icon
348 * available at https://material.io/icons/#ic_cancel.
349 *
350 * Example:
351 *
352 * `<mat-chip>
353 * <mat-icon matChipRemove>cancel</mat-icon>
354 * </mat-chip>`
355 *
356 * You *may* use a custom icon, but you may need to override the `mat-chip-remove` positioning
357 * styles to properly center the icon within the chip.
358 */
359export class MatChipRemove {
360 constructor(_parentChip, elementRef) {
361 this._parentChip = _parentChip;
362 if (elementRef.nativeElement.nodeName === 'BUTTON') {
363 elementRef.nativeElement.setAttribute('type', 'button');
364 }
365 }
366 /** Calls the parent chip's public `remove()` method if applicable. */
367 _handleClick(event) {
368 const parentChip = this._parentChip;
369 if (parentChip.removable && !parentChip.disabled) {
370 parentChip.remove();
371 }
372 // We need to stop event propagation because otherwise the event will bubble up to the
373 // form field and cause the `onContainerClick` method to be invoked. This method would then
374 // reset the focused chip that has been focused after chip removal. Usually the parent
375 // the parent click listener of the `MatChip` would prevent propagation, but it can happen
376 // that the chip is being removed before the event bubbles up.
377 event.stopPropagation();
378 }
379}
380MatChipRemove.decorators = [
381 { type: Directive, args: [{
382 selector: '[matChipRemove]',
383 host: {
384 'class': 'mat-chip-remove mat-chip-trailing-icon',
385 '(click)': '_handleClick($event)',
386 },
387 providers: [{ provide: MAT_CHIP_REMOVE, useExisting: MatChipRemove }],
388 },] }
389];
390MatChipRemove.ctorParameters = () => [
391 { type: MatChip },
392 { type: ElementRef }
393];
394//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hpcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9jaGlwcy9jaGlwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUdILE9BQU8sRUFBZSxxQkFBcUIsRUFBYyxNQUFNLHVCQUF1QixDQUFDO0FBQ3ZGLE9BQU8sRUFBQyxTQUFTLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQy9ELE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUMvQyxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDekMsT0FBTyxFQUNMLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsWUFBWSxFQUNaLFNBQVMsRUFDVCxVQUFVLEVBQ1YsWUFBWSxFQUNaLE1BQU0sRUFDTixjQUFjLEVBQ2QsS0FBSyxFQUNMLE1BQU0sRUFFTixRQUFRLEVBQ1IsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFLTCx5QkFBeUIsRUFDek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