@fundamental-ngx/core 0.43.9 → 0.43.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/date-picker/date-picker.component.d.ts +2 -0
- package/datetime-picker/datetime-picker.component.d.ts +2 -0
- package/dialog/base/dialog-base.service.d.ts +4 -3
- package/dialog/dialog-container/dialog-container.component.d.ts +12 -11
- package/dialog/index.d.ts +11 -10
- package/dialog/utils/dialog-container.model.d.ts +4 -0
- package/esm2020/busy-indicator/busy-indicator.component.mjs +3 -3
- package/esm2020/date-picker/date-picker.component.mjs +8 -8
- package/esm2020/datetime-picker/datetime-picker.component.mjs +8 -7
- package/esm2020/dialog/base/dialog-base.service.mjs +8 -3
- package/esm2020/dialog/dialog-container/dialog-container.component.mjs +23 -23
- package/esm2020/dialog/index.mjs +12 -11
- package/esm2020/dialog/utils/dialog-container.model.mjs +2 -0
- package/esm2020/form/form-message/popover-form-message.service.mjs +2 -12
- package/esm2020/message-box/message-box-container/message-box-container.component.mjs +23 -24
- package/esm2020/multi-input/multi-input.component.mjs +76 -56
- package/esm2020/multi-input/multi-input.module.mjs +17 -14
- package/esm2020/multi-input/pair-selection.model.mjs +38 -0
- package/esm2020/popover/popover-body/popover-body.component.mjs +3 -3
- package/esm2020/popover/popover-service/popover.service.mjs +9 -2
- package/esm2020/time-picker/time-picker.component.mjs +19 -20
- package/esm2020/token/token.component.mjs +4 -3
- package/esm2020/token/tokenizer.component.mjs +32 -13
- package/fesm2015/fundamental-ngx-core-busy-indicator.mjs +2 -2
- package/fesm2015/fundamental-ngx-core-busy-indicator.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-date-picker.mjs +6 -6
- package/fesm2015/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-datetime-picker.mjs +6 -6
- package/fesm2015/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-dialog.mjs +189 -184
- package/fesm2015/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-form.mjs +1 -10
- package/fesm2015/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-message-box.mjs +20 -20
- package/fesm2015/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-multi-input.mjs +158 -100
- package/fesm2015/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-popover.mjs +10 -3
- package/fesm2015/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-time-picker.mjs +14 -16
- package/fesm2015/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-token.mjs +29 -9
- package/fesm2015/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-busy-indicator.mjs +2 -2
- package/fesm2020/fundamental-ngx-core-busy-indicator.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-date-picker.mjs +6 -6
- package/fesm2020/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-datetime-picker.mjs +6 -5
- package/fesm2020/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-dialog.mjs +188 -183
- package/fesm2020/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-form.mjs +1 -10
- package/fesm2020/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-message-box.mjs +20 -20
- package/fesm2020/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-multi-input.mjs +158 -98
- package/fesm2020/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-popover.mjs +10 -3
- package/fesm2020/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-time-picker.mjs +15 -16
- package/fesm2020/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-token.mjs +29 -9
- package/fesm2020/fundamental-ngx-core-token.mjs.map +1 -1
- package/form/form-message/popover-form-message.service.d.ts +3 -7
- package/fundamental-ngx-core-v0.43.11.tgz +0 -0
- package/message-box/message-box-container/message-box-container.component.d.ts +12 -13
- package/multi-input/multi-input.component.d.ts +30 -21
- package/multi-input/multi-input.module.d.ts +2 -1
- package/multi-input/pair-selection.model.d.ts +19 -0
- package/package.json +3 -3
- package/popover/popover-service/popover.service.d.ts +1 -1
- package/schematics/add-dependencies/index.js +4 -4
- package/time-picker/time-picker.component.d.ts +17 -15
- package/token/tokenizer.component.d.ts +10 -2
- package/fundamental-ngx-core-v0.43.9.tgz +0 -0
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Optional, ViewChild, NgModule, EventEmitter, Injector, forwardRef, TemplateRef, ElementRef, Input, Output, HostListener, Directive } from '@angular/core';
|
|
3
1
|
import * as i3$1 from '@angular/common';
|
|
4
2
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { SPACE, ENTER, DOWN_ARROW, UP_ARROW, ESCAPE, TAB } from '@angular/cdk/keycodes';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { forwardRef, Directive, InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Optional, ViewChild, NgModule, EventEmitter, Injector, isDevMode, TemplateRef, ElementRef, Input, Output, HostListener } from '@angular/core';
|
|
8
5
|
import * as i5$1 from '@angular/forms';
|
|
9
6
|
import { FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
-
import * as i12 from 'rxjs';
|
|
11
|
-
import { BehaviorSubject, Subscription, combineLatest, firstValueFrom } from 'rxjs';
|
|
12
|
-
import { takeUntil, distinctUntilChanged, map, first, startWith } from 'rxjs/operators';
|
|
13
7
|
import * as i2$1 from '@fundamental-ngx/cdk/utils';
|
|
14
8
|
import { RangeSelector, uuidv4, KeyUtil, applyCssClass, PipeModule, AutoCompleteModule } from '@fundamental-ngx/cdk/utils';
|
|
9
|
+
import * as i10 from '@fundamental-ngx/core/checkbox';
|
|
10
|
+
import { CheckboxModule } from '@fundamental-ngx/core/checkbox';
|
|
11
|
+
import * as i1$1 from '@fundamental-ngx/core/content-density';
|
|
12
|
+
import { DeprecatedCompactDirective, CONTENT_DENSITY_DIRECTIVE, contentDensityObserverProviders, ContentDensityModule } from '@fundamental-ngx/core/content-density';
|
|
15
13
|
import * as i9 from '@fundamental-ngx/core/form';
|
|
16
14
|
import { registerFormItemControl, FormModule } from '@fundamental-ngx/core/form';
|
|
15
|
+
import * as i8 from '@fundamental-ngx/core/input-group';
|
|
16
|
+
import { InputGroupModule } from '@fundamental-ngx/core/input-group';
|
|
17
|
+
import * as i11 from '@fundamental-ngx/core/link';
|
|
18
|
+
import { LinkModule } from '@fundamental-ngx/core/link';
|
|
17
19
|
import * as i6 from '@fundamental-ngx/core/list';
|
|
18
20
|
import { ListComponent, ListModule } from '@fundamental-ngx/core/list';
|
|
19
|
-
import { MenuKeyboardService } from '@fundamental-ngx/core/menu';
|
|
20
21
|
import * as i7 from '@fundamental-ngx/core/popover';
|
|
21
22
|
import { PopoverComponent, PopoverModule } from '@fundamental-ngx/core/popover';
|
|
22
23
|
import * as i4 from '@fundamental-ngx/core/token';
|
|
23
24
|
import { TokenizerComponent, TokenModule } from '@fundamental-ngx/core/token';
|
|
24
|
-
import * as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import * as i12 from '@fundamental-ngx/i18n';
|
|
26
|
+
import { I18nModule } from '@fundamental-ngx/i18n';
|
|
27
|
+
import { __decorate, __metadata } from 'tslib';
|
|
28
|
+
import { SPACE, ENTER, DOWN_ARROW, UP_ARROW, ESCAPE, TAB } from '@angular/cdk/keycodes';
|
|
29
|
+
import { BehaviorSubject, Subscription, combineLatest } from 'rxjs';
|
|
30
|
+
import { takeUntil, distinctUntilChanged, map, first, startWith } from 'rxjs/operators';
|
|
31
|
+
import { MenuKeyboardService } from '@fundamental-ngx/core/menu';
|
|
32
|
+
import get from 'lodash-es/get';
|
|
27
33
|
import * as i1 from '@fundamental-ngx/core/dialog';
|
|
28
34
|
import { DialogModule } from '@fundamental-ngx/core/dialog';
|
|
29
35
|
import { MobileModeBase, MobileModeControl, MOBILE_MODE_CONFIG } from '@fundamental-ngx/core/mobile-mode';
|
|
@@ -32,12 +38,33 @@ import { BarModule } from '@fundamental-ngx/core/bar';
|
|
|
32
38
|
import * as i3 from '@fundamental-ngx/core/title';
|
|
33
39
|
import * as i5 from '@fundamental-ngx/core/button';
|
|
34
40
|
import { ButtonModule } from '@fundamental-ngx/core/button';
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
|
|
42
|
+
class DeprecatedMultiInputCompactDirective extends DeprecatedCompactDirective {
|
|
43
|
+
/** @hidden */
|
|
44
|
+
constructor() {
|
|
45
|
+
super('fd-multi-input');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
DeprecatedMultiInputCompactDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedMultiInputCompactDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
49
|
+
DeprecatedMultiInputCompactDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedMultiInputCompactDirective, selector: "fd-multi-input[compact]", providers: [
|
|
50
|
+
{
|
|
51
|
+
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
52
|
+
useExisting: forwardRef(() => DeprecatedMultiInputCompactDirective)
|
|
53
|
+
}
|
|
54
|
+
], usesInheritance: true, ngImport: i0 });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedMultiInputCompactDirective, decorators: [{
|
|
56
|
+
type: Directive,
|
|
57
|
+
args: [{
|
|
58
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
59
|
+
selector: 'fd-multi-input[compact]',
|
|
60
|
+
providers: [
|
|
61
|
+
{
|
|
62
|
+
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
63
|
+
useExisting: forwardRef(() => DeprecatedMultiInputCompactDirective)
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}]
|
|
67
|
+
}], ctorParameters: function () { return []; } });
|
|
41
68
|
|
|
42
69
|
const MULTI_INPUT_COMPONENT = new InjectionToken('MultiInputComponent');
|
|
43
70
|
|
|
@@ -135,12 +162,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
135
162
|
}]
|
|
136
163
|
}] });
|
|
137
164
|
|
|
165
|
+
class PairSelectionModel {
|
|
166
|
+
constructor() {
|
|
167
|
+
/** @hidden */
|
|
168
|
+
this._selected = new Map();
|
|
169
|
+
/** Event emitted when the selection has changed. */
|
|
170
|
+
this.selectionChanged = new EventEmitter();
|
|
171
|
+
}
|
|
172
|
+
/** Array of selected items */
|
|
173
|
+
get selected() {
|
|
174
|
+
return [...this._selected.values()];
|
|
175
|
+
}
|
|
176
|
+
/** Whether the given key exists in the record */
|
|
177
|
+
isSelected(key) {
|
|
178
|
+
return this._selected.has(key);
|
|
179
|
+
}
|
|
180
|
+
/** Selects the given key-value pair */
|
|
181
|
+
select(keyOrValues, value) {
|
|
182
|
+
if (value) {
|
|
183
|
+
this._selected.set(keyOrValues, value);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
keyOrValues.forEach(([key, v]) => this._selected.set(key, v));
|
|
187
|
+
}
|
|
188
|
+
this.selectionChanged.emit([...this._selected]);
|
|
189
|
+
}
|
|
190
|
+
/** Deselects the given key */
|
|
191
|
+
deselect(key) {
|
|
192
|
+
this._selected.delete(key);
|
|
193
|
+
this.selectionChanged.emit([...this._selected]);
|
|
194
|
+
}
|
|
195
|
+
/** Clears the selection information */
|
|
196
|
+
clear() {
|
|
197
|
+
this._selected.clear();
|
|
198
|
+
this.selectionChanged.emit([...this._selected]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
138
202
|
function isOptionItem(candidate) {
|
|
139
|
-
return isOptionItemBase(candidate) && 'item' in candidate;
|
|
203
|
+
return isOptionItemBase(candidate) && 'item' in candidate && 'id' in candidate;
|
|
140
204
|
}
|
|
141
205
|
function isOptionItemBase(candidate) {
|
|
142
206
|
return typeof candidate === 'object' && candidate !== null && 'value' in candidate && 'label' in candidate;
|
|
143
207
|
}
|
|
208
|
+
let uniqueHiddenLabel = 0;
|
|
144
209
|
/**
|
|
145
210
|
* Input field with multiple selection enabled. Should be used when a user can select between a
|
|
146
211
|
* limited number of pre-defined options with a filter-enabled context.
|
|
@@ -158,10 +223,21 @@ class MultiInputComponent {
|
|
|
158
223
|
/** Selected dropdown items. */
|
|
159
224
|
set selected(values) {
|
|
160
225
|
this._selectionModel.clear();
|
|
161
|
-
values
|
|
226
|
+
if (values) {
|
|
227
|
+
const potentialItems = [...values];
|
|
228
|
+
const options = [];
|
|
229
|
+
potentialItems.forEach((value) => {
|
|
230
|
+
let optionItem = this._optionItems.find((i) => i.value === value);
|
|
231
|
+
if (!optionItem) {
|
|
232
|
+
optionItem = this._getOptionItem(value);
|
|
233
|
+
}
|
|
234
|
+
options.push(optionItem);
|
|
235
|
+
});
|
|
236
|
+
this._selectionModel.select(options.map((item) => [item.id, item]));
|
|
237
|
+
}
|
|
162
238
|
}
|
|
163
239
|
get selected() {
|
|
164
|
-
return this._selectionModel.selected;
|
|
240
|
+
return this._selectionModel.selected.map((c) => c.value);
|
|
165
241
|
}
|
|
166
242
|
/** @hidden */
|
|
167
243
|
get _popoverMaxWidth() {
|
|
@@ -173,6 +249,10 @@ class MultiInputComponent {
|
|
|
173
249
|
}
|
|
174
250
|
return this.elementRef.nativeElement.getBoundingClientRect().width;
|
|
175
251
|
}
|
|
252
|
+
/** @hidden */
|
|
253
|
+
get _optionItems() {
|
|
254
|
+
return this.optionItems$.value;
|
|
255
|
+
}
|
|
176
256
|
/** typeahead matcher function */
|
|
177
257
|
get typeAheadMatcher() {
|
|
178
258
|
if (this.includes) {
|
|
@@ -181,14 +261,13 @@ class MultiInputComponent {
|
|
|
181
261
|
return (item, searchTerm) => item.startsWith(searchTerm);
|
|
182
262
|
}
|
|
183
263
|
/** @hidden */
|
|
184
|
-
constructor(_contentDensityObserver, elementRef, _changeDetRef, _dynamicComponentService, _injector, _viewContainerRef,
|
|
264
|
+
constructor(_contentDensityObserver, elementRef, _changeDetRef, _dynamicComponentService, _injector, _viewContainerRef, _rtlService, _focusTrapService) {
|
|
185
265
|
this._contentDensityObserver = _contentDensityObserver;
|
|
186
266
|
this.elementRef = elementRef;
|
|
187
267
|
this._changeDetRef = _changeDetRef;
|
|
188
268
|
this._dynamicComponentService = _dynamicComponentService;
|
|
189
269
|
this._injector = _injector;
|
|
190
270
|
this._viewContainerRef = _viewContainerRef;
|
|
191
|
-
this._language = _language;
|
|
192
271
|
this._rtlService = _rtlService;
|
|
193
272
|
this._focusTrapService = _focusTrapService;
|
|
194
273
|
/** Placeholder for the input field. */
|
|
@@ -286,6 +365,10 @@ class MultiInputComponent {
|
|
|
286
365
|
this.open = false;
|
|
287
366
|
/** Whether or not to display the addon button. */
|
|
288
367
|
this.displayAddonButton = true;
|
|
368
|
+
/** @hidden */
|
|
369
|
+
this._tokenCountHiddenLabel = `fd-multi-input-token-count-id-${uniqueHiddenLabel++}`;
|
|
370
|
+
/** token count hidden label */
|
|
371
|
+
this.tokenHiddenId = this._tokenCountHiddenLabel;
|
|
289
372
|
/** Event emitted, when the multi input's popover body is opened or closed */
|
|
290
373
|
this.openChange = new EventEmitter();
|
|
291
374
|
/** Emits event when the addon button is clicked. */
|
|
@@ -297,7 +380,7 @@ class MultiInputComponent {
|
|
|
297
380
|
/** @hidden */
|
|
298
381
|
this._searchTermCtrl = new FormControl('');
|
|
299
382
|
/** @hidden */
|
|
300
|
-
this._selectionModel = new
|
|
383
|
+
this._selectionModel = new PairSelectionModel();
|
|
301
384
|
/** @hidden */
|
|
302
385
|
this._viewModel$ = this._getViewModel();
|
|
303
386
|
/** @hidden */
|
|
@@ -305,8 +388,6 @@ class MultiInputComponent {
|
|
|
305
388
|
/** @hidden */
|
|
306
389
|
this._rangeSelector = new RangeSelector();
|
|
307
390
|
/** @hidden */
|
|
308
|
-
this._translationResolver = new TranslationResolver();
|
|
309
|
-
/** @hidden */
|
|
310
391
|
this._trackBy = (index, optionItem) => this.valueFn(optionItem?.item);
|
|
311
392
|
/** @hidden */
|
|
312
393
|
this.onChange = () => { };
|
|
@@ -351,9 +432,6 @@ class MultiInputComponent {
|
|
|
351
432
|
this._subscriptions.add(this._getViewModel()
|
|
352
433
|
.pipe(map((viewModel) => !viewModel.displayedOptions.some((c) => !c.isSelected)))
|
|
353
434
|
.subscribe((allItemsSelected) => this.allItemsSelectedChange.emit(allItemsSelected)));
|
|
354
|
-
this._subscriptions.add(this._language.subscribe(() => {
|
|
355
|
-
this._getAriaLabel();
|
|
356
|
-
}));
|
|
357
435
|
}
|
|
358
436
|
/** @hidden */
|
|
359
437
|
ngOnChanges(changes) {
|
|
@@ -438,7 +516,7 @@ class MultiInputComponent {
|
|
|
438
516
|
/** Method that selects all possible options. */
|
|
439
517
|
selectAllItems(selectAll) {
|
|
440
518
|
if (selectAll) {
|
|
441
|
-
this.selected = this.
|
|
519
|
+
this.selected = this._optionItems.map((c) => c.value);
|
|
442
520
|
}
|
|
443
521
|
else {
|
|
444
522
|
this.selected = [];
|
|
@@ -447,17 +525,17 @@ class MultiInputComponent {
|
|
|
447
525
|
this._propagateChange();
|
|
448
526
|
}
|
|
449
527
|
/** @hidden */
|
|
450
|
-
_onCheckboxKeyup(
|
|
528
|
+
_onCheckboxKeyup(option, event, index) {
|
|
451
529
|
if (KeyUtil.isKeyCode(event, [SPACE, ENTER])) {
|
|
452
|
-
this._onCheckboxClick(
|
|
530
|
+
this._onCheckboxClick(option, event, index);
|
|
453
531
|
}
|
|
454
532
|
}
|
|
455
533
|
/** @hidden */
|
|
456
|
-
async _onCheckboxClick(
|
|
457
|
-
const toggledSelection = !this._selectionModel.isSelected(
|
|
534
|
+
async _onCheckboxClick(option, event, index, isListItem = false) {
|
|
535
|
+
const toggledSelection = !this._selectionModel.isSelected(option.id);
|
|
458
536
|
this._rangeSelector.onRangeElementToggled(index, event);
|
|
459
537
|
const sub = this._viewModel$.pipe(first()).subscribe((vm) => {
|
|
460
|
-
this._rangeSelector.applyValueToEachInRange((idx) => this._handleSelect(toggledSelection, vm.displayedOptions[idx]
|
|
538
|
+
this._rangeSelector.applyValueToEachInRange((idx) => this._handleSelect(toggledSelection, vm.displayedOptions[idx], false));
|
|
461
539
|
this._changeDetRef.detectChanges();
|
|
462
540
|
});
|
|
463
541
|
this._subscriptions.add(sub);
|
|
@@ -470,18 +548,18 @@ class MultiInputComponent {
|
|
|
470
548
|
}
|
|
471
549
|
}
|
|
472
550
|
/** @hidden */
|
|
473
|
-
_onTokenClick(
|
|
551
|
+
_onTokenClick(option, resetSearch, event) {
|
|
474
552
|
event?.preventDefault(); // prevent this function from being called twice when checkbox updates
|
|
475
|
-
this._handleSelect(false,
|
|
553
|
+
this._handleSelect(false, option, resetSearch, true);
|
|
476
554
|
}
|
|
477
555
|
/** @hidden */
|
|
478
|
-
_handleSelect(checked,
|
|
556
|
+
_handleSelect(checked, option, resetSearch = true, fromTokenCloseClick = false) {
|
|
479
557
|
const previousLength = this._selectionModel.selected.length;
|
|
480
558
|
if (checked) {
|
|
481
|
-
this._selectionModel.select(
|
|
559
|
+
this._selectionModel.select(option.id, option);
|
|
482
560
|
}
|
|
483
561
|
else {
|
|
484
|
-
this._selectionModel.deselect(
|
|
562
|
+
this._selectionModel.deselect(option.id);
|
|
485
563
|
}
|
|
486
564
|
// Handle popover placement update
|
|
487
565
|
if (this._shouldPopoverBeUpdated(previousLength, this._selectionModel.selected.length)) {
|
|
@@ -602,14 +680,14 @@ class MultiInputComponent {
|
|
|
602
680
|
_addNewTokenToDropDownValues(newToken) {
|
|
603
681
|
this.dropdownValues.push(newToken);
|
|
604
682
|
const newOption = this._getOptionItem(newToken);
|
|
605
|
-
this.optionItems$.next([...this.
|
|
683
|
+
this.optionItems$.next([...this._optionItems, newOption]);
|
|
606
684
|
}
|
|
607
685
|
/** @hidden */
|
|
608
686
|
_selectFirstFiltered(searchTerm) {
|
|
609
687
|
const filtered = this.filterFn(this.dropdownValues, searchTerm);
|
|
610
688
|
if (Array.isArray(filtered) && filtered.length > 0 && this.autoComplete) {
|
|
611
689
|
const optionItem = this._getOptionItem(filtered[0]);
|
|
612
|
-
this._handleSelect(true, optionItem
|
|
690
|
+
this._handleSelect(true, optionItem);
|
|
613
691
|
this._searchTermCtrl.setValue('');
|
|
614
692
|
this.open = false;
|
|
615
693
|
return true;
|
|
@@ -621,8 +699,8 @@ class MultiInputComponent {
|
|
|
621
699
|
const searchLower = searchTerm.toLocaleLowerCase();
|
|
622
700
|
return contentArray.filter((item) => {
|
|
623
701
|
if (item) {
|
|
624
|
-
const displayedValue = this.displayFn(item);
|
|
625
|
-
const term =
|
|
702
|
+
const displayedValue = isOptionItem(item) ? item.label : this.displayFn(item);
|
|
703
|
+
const term = displayedValue?.toLocaleLowerCase() || '';
|
|
626
704
|
return this.typeAheadMatcher(term, searchLower);
|
|
627
705
|
}
|
|
628
706
|
});
|
|
@@ -655,7 +733,7 @@ class MultiInputComponent {
|
|
|
655
733
|
/** @hidden */
|
|
656
734
|
_propagateChange(emitInMobile) {
|
|
657
735
|
if (!this.mobile || emitInMobile) {
|
|
658
|
-
const selected =
|
|
736
|
+
const selected = this._selectionModel.selected.map((c) => c.value);
|
|
659
737
|
this.onChange(selected);
|
|
660
738
|
this.selectedChange.emit(selected);
|
|
661
739
|
}
|
|
@@ -677,6 +755,20 @@ class MultiInputComponent {
|
|
|
677
755
|
}, MultiInputMobileModule, MultiInputMobileComponent, this._viewContainerRef, injector);
|
|
678
756
|
}
|
|
679
757
|
/** @hidden */
|
|
758
|
+
_getItemIdentifier(item) {
|
|
759
|
+
if (!this.optionItemIdentifier) {
|
|
760
|
+
const value = this.valueFn(item);
|
|
761
|
+
if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'symbol' && isDevMode()) {
|
|
762
|
+
console.warn('optionItemIdentifier is not set and valueFn does not return a string, number or symbol', item);
|
|
763
|
+
}
|
|
764
|
+
return value;
|
|
765
|
+
}
|
|
766
|
+
if (typeof this.optionItemIdentifier === 'function') {
|
|
767
|
+
return this.optionItemIdentifier(item);
|
|
768
|
+
}
|
|
769
|
+
return get(item, this.optionItemIdentifier);
|
|
770
|
+
}
|
|
771
|
+
/** @hidden */
|
|
680
772
|
_resetSearchTerm() {
|
|
681
773
|
this._searchTermCtrl.setValue('');
|
|
682
774
|
this._changeDetRef.detectChanges();
|
|
@@ -688,6 +780,7 @@ class MultiInputComponent {
|
|
|
688
780
|
}
|
|
689
781
|
const { label, value } = this._getValueAndLabelOfItem(item);
|
|
690
782
|
return {
|
|
783
|
+
id: this._getItemIdentifier(item),
|
|
691
784
|
item,
|
|
692
785
|
label,
|
|
693
786
|
value,
|
|
@@ -710,33 +803,23 @@ class MultiInputComponent {
|
|
|
710
803
|
return { label, value };
|
|
711
804
|
}
|
|
712
805
|
/** @hidden */
|
|
713
|
-
_getOptionItemByValue(value, optionItems = []) {
|
|
714
|
-
return optionItems.find((c) => c.value === value);
|
|
715
|
-
}
|
|
716
|
-
/** @hidden */
|
|
717
806
|
_getViewModel() {
|
|
718
807
|
return combineLatest([
|
|
719
808
|
this._searchTermCtrl.valueChanges.pipe(startWith(this._searchTermCtrl.value)),
|
|
720
|
-
this._selectionModel.
|
|
809
|
+
this._selectionModel.selectionChanged.pipe(startWith(null)),
|
|
721
810
|
this.optionItems$
|
|
722
|
-
]).pipe(map((
|
|
723
|
-
const selected = this.selected.map((v) => this._getOptionItemByValue(v, optionItems) || this._getOptionItem(v));
|
|
811
|
+
]).pipe(map(() => {
|
|
724
812
|
// not using "searchTerm" value from combineLatest as it will be wrong for late subscribers, if any
|
|
725
813
|
const searchTerm = this._searchTermCtrl.value ?? '';
|
|
726
|
-
const filtered = this.filterFn(
|
|
814
|
+
const filtered = this.filterFn(this.dropdownValues, searchTerm);
|
|
727
815
|
const displayedOptions = (Array.isArray(filtered) ? filtered : []).map((item) => this._getOptionItem(item));
|
|
728
|
-
displayedOptions.forEach((c) => (c.isSelected =
|
|
729
|
-
return { selectedOptions: selected, displayedOptions };
|
|
816
|
+
displayedOptions.forEach((c) => (c.isSelected = this._selectionModel.isSelected(c.id)));
|
|
817
|
+
return { selectedOptions: this._selectionModel.selected, displayedOptions };
|
|
730
818
|
}));
|
|
731
819
|
}
|
|
732
|
-
/** @hidden */
|
|
733
|
-
async _getAriaLabel() {
|
|
734
|
-
const lang = await firstValueFrom(this._language);
|
|
735
|
-
this._defaultAriaLabel = this._translationResolver.resolve(lang, 'coreMultiInput.multiInputAriaLabel');
|
|
736
|
-
}
|
|
737
820
|
}
|
|
738
|
-
MultiInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputComponent, deps: [{ token: i1$1.ContentDensityObserver }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i2$1.DynamicComponentService }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token:
|
|
739
|
-
MultiInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: MultiInputComponent, selector: "fd-multi-input", inputs: { placeholder: "placeholder", disabled: "disabled", required: "required", compactCollapse: "compactCollapse", maxHeight: "maxHeight", glyph: "glyph", dropdownValues: "dropdownValues", openDropdownOnAddOnClicked: "openDropdownOnAddOnClicked", searchTerm: "searchTerm", inputId: "inputId", highlight: "highlight", selected: "selected", class: "class", filterFn: "filterFn", valueFn: "valueFn", displayFn: "displayFn", newTokenParseFn: "newTokenParseFn", newTokenValidateFn: "newTokenValidateFn", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", fillControlMode: "fillControlMode", state: "state", buttonFocusable: "buttonFocusable", allowNewTokens: "allowNewTokens", mobile: "mobile", showAllButton: "showAllButton", bodyMaxWidth: "bodyMaxWidth", mobileConfig: "mobileConfig", includes: "includes", itemTemplate: "itemTemplate", title: "title", byline: "byline", autoComplete: "autoComplete", open: "open", displayAddonButton: "displayAddonButton" }, outputs: { searchTermChange: "searchTermChange", selectedChange: "selectedChange", openChange: "openChange", addOnButtonClicked: "addOnButtonClicked", allItemsSelectedChange: "allItemsSelectedChange" }, host: { listeners: { "focusout": "_focusOut($event)" } }, providers: [
|
|
821
|
+
MultiInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputComponent, deps: [{ token: i1$1.ContentDensityObserver }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i2$1.DynamicComponentService }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: i2$1.RtlService, optional: true }, { token: i2$1.FocusTrapService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
822
|
+
MultiInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: MultiInputComponent, selector: "fd-multi-input", inputs: { placeholder: "placeholder", disabled: "disabled", required: "required", compactCollapse: "compactCollapse", maxHeight: "maxHeight", glyph: "glyph", dropdownValues: "dropdownValues", openDropdownOnAddOnClicked: "openDropdownOnAddOnClicked", searchTerm: "searchTerm", inputId: "inputId", highlight: "highlight", selected: "selected", class: "class", filterFn: "filterFn", valueFn: "valueFn", displayFn: "displayFn", newTokenParseFn: "newTokenParseFn", optionItemIdentifier: "optionItemIdentifier", newTokenValidateFn: "newTokenValidateFn", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", fillControlMode: "fillControlMode", state: "state", buttonFocusable: "buttonFocusable", allowNewTokens: "allowNewTokens", mobile: "mobile", showAllButton: "showAllButton", bodyMaxWidth: "bodyMaxWidth", mobileConfig: "mobileConfig", includes: "includes", itemTemplate: "itemTemplate", title: "title", byline: "byline", autoComplete: "autoComplete", open: "open", displayAddonButton: "displayAddonButton", tokenHiddenId: "tokenHiddenId" }, outputs: { searchTermChange: "searchTermChange", selectedChange: "selectedChange", openChange: "openChange", addOnButtonClicked: "addOnButtonClicked", allItemsSelectedChange: "allItemsSelectedChange" }, host: { listeners: { "focusout": "_focusOut($event)" } }, providers: [
|
|
740
823
|
{
|
|
741
824
|
provide: NG_VALUE_ACCESSOR,
|
|
742
825
|
useExisting: forwardRef(() => MultiInputComponent),
|
|
@@ -745,7 +828,7 @@ MultiInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
745
828
|
MenuKeyboardService,
|
|
746
829
|
registerFormItemControl(MultiInputComponent),
|
|
747
830
|
contentDensityObserverProviders()
|
|
748
|
-
], viewQueries: [{ propertyName: "popoverRef", first: true, predicate: PopoverComponent, descendants: true }, { propertyName: "controlTemplate", first: true, predicate: ["control"], descendants: true, read: TemplateRef }, { propertyName: "listTemplate", first: true, predicate: ["list"], descendants: true, read: TemplateRef }, { propertyName: "listComponent", first: true, predicate: ListComponent, descendants: true }, { propertyName: "searchInputElement", first: true, predicate: ["searchInputElement"], descendants: true, read: ElementRef }, { propertyName: "tokenizer", first: true, predicate: TokenizerComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"_viewModel$ | async as viewModel\">\n <div class=\"fd-multi-input fd-multi-input-custom\">\n <div class=\"fd-multi-input-field\">\n <ng-container\n [ngTemplateOutlet]=\"control\"\n [ngTemplateOutletContext]=\"{ displayAddonButton: displayAddonButton }\"\n *ngIf=\"mobile\"\n ></ng-container>\n\n <fd-popover\n additionalBodyClass=\"fd-popover-custom-list\"\n *ngIf=\"!mobile\"\n [isOpen]=\"open\"\n (isOpenChange)=\"openChangeHandle($event)\"\n (input)=\"!open && openChangeHandle(true)\"\n [triggers]=\"[]\"\n [maxWidth]=\"_popoverMaxWidth\"\n [disabled]=\"disabled\"\n [fillControlMode]=\"fillControlMode\"\n class=\"fd-multi-input-popover-custom\"\n >\n <fd-popover-control>\n <form (submit)=\"_onSubmit()\">\n <ng-container\n *ngTemplateOutlet=\"control; context: { displayAddonButton: displayAddonButton }\"\n ></ng-container>\n </form>\n </fd-popover-control>\n\n <fd-popover-body\n [attr.aria-hidden]=\"!open\"\n [class.fd-popover__body--hidden]=\"!viewModel.displayedOptions.length\"\n >\n <ng-container *ngTemplateOutlet=\"list\"></ng-container>\n\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n </div>\n </div>\n\n <ng-template #control let-showAddonButton=\"displayAddonButton\">\n <fd-input-group\n class=\"fd-multi-input-input-group-custom\"\n [state]=\"state\"\n [buttonFocusable]=\"buttonFocusable\"\n [button]=\"showAddonButton\"\n [disabled]=\"disabled\"\n [isExpanded]=\"open && !mobile && viewModel.displayedOptions.length > 0\"\n [isControl]=\"true\"\n [glyph]=\"showAddonButton ? glyph : ''\"\n [iconTitle]=\"title\"\n (addOnButtonClicked)=\"_addOnButtonClicked($event)\"\n >\n <fd-tokenizer\n #tokenizer\n [compactCollapse]=\"compactCollapse\"\n [open]=\"open\"\n [tokenizerFocusable]=\"false\"\n (moreClickedEvent)=\"_moreClicked()\"\n class=\"fd-multi-input-tokenizer-custom\"\n tabindex=\"-1\"\n >\n <fd-token\n *ngFor=\"let option of viewModel.selectedOptions; trackBy: _trackBy\"\n [disabled]=\"disabled\"\n (onCloseClick)=\"_onTokenClick(option.value, false, $event)\"\n (onRemove)=\"_onTokenClick(option.value, false)\"\n >\n <span [innerHtml]=\"option.label\"></span>\n </fd-token>\n\n <input\n type=\"text\"\n class=\"fd-input fd-tokenizer__input fd-multi-input-tokenizer-input\"\n autocomplete=\"off\"\n fd-form-control\n fd-input-group-input\n fdkAutoComplete\n (onComplete)=\"_handleComplete($event)\"\n #searchInputElement\n [displayFn]=\"displayFn\"\n [matcher]=\"typeAheadMatcher\"\n [inputText]=\"_searchTermCtrl.value || ''\"\n [options]=\"dropdownValues\"\n [enable]=\"autoComplete && !mobile\"\n [placeholder]=\"placeholder\"\n [formControl]=\"_searchTermCtrl\"\n [attr.aria-required]=\"required\"\n [ariaLabel]=\"ariaLabel || _defaultAriaLabel\"\n [ariaLabelledBy]=\"ariaLabelledBy\"\n (keydown)=\"_handleInputKeydown($event)\"\n [attr.id]=\"inputId\"\n (focus)=\"tokenizer._showAllTokens()\"\n (blur)=\"tokenizer._hideTokens()\"\n />\n </fd-tokenizer>\n </fd-input-group>\n </ng-template>\n\n <ng-template #list>\n <ul\n *ngIf=\"viewModel.displayedOptions.length\"\n fd-list\n class=\"fd-multi-input-menu-overflow\"\n [selection]=\"true\"\n [mobileMode]=\"mobile\"\n [style.max-height]=\"!mobile ? maxHeight : 'auto'\"\n [byline]=\"byline\"\n (focusEscapeList)=\"handleListFocusEscape($event)\"\n [style.minWidth]=\"'100%'\"\n aria-multiselectable=\"true\"\n >\n <li\n *ngFor=\"let option of viewModel.displayedOptions; index as idx; trackBy: _trackBy\"\n fd-list-item\n [attr.aria-label]=\"option.label\"\n (click)=\"_onCheckboxClick(option.value, $event, idx, true)\"\n (keyup)=\"_onCheckboxKeyup(option.value, $event, idx)\"\n [selected]=\"!!option.isSelected\"\n >\n <fd-checkbox (click)=\"_onCheckboxClick(option.value, $event, idx)\" [value]=\"option.isSelected\">\n <!-- TODO -->\n </fd-checkbox>\n\n <ng-container\n [ngTemplateOutlet]=\"itemSource\"\n [ngTemplateOutletContext]=\"{ option: option }\"\n ></ng-container>\n </li>\n\n <li\n *ngIf=\"showAllButton && viewModel.displayedOptions.length < dropdownValues.length\"\n fd-list-item\n class=\"fd-multi-input-show-all\"\n (keyDown)=\"_showAllKeyDown($event)\"\n (click)=\"_showAllClicked($event)\"\n >\n <a fd-link tabindex=\"0\">Show All ({{ dropdownValues.length }})</a>\n </li>\n </ul>\n </ng-template>\n\n <ng-template let-option=\"option\" #itemSource>\n <span\n *ngIf=\"!itemTemplate\"\n fd-list-title\n [innerHtml]=\"option.label | highlight : _searchTermCtrl.value || '' : highlight\"\n ></span>\n\n <ng-container *ngIf=\"itemTemplate\">\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option.item }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [".fd-multi-input-tokenizer-custom{width:calc(100% - 2.25rem)}[class*=--compact] .fd-multi-input-tokenizer-custom:not([class*=\"--cozy\"]):not([class*=\"--condensed\"]),.is-compact .fd-multi-input-tokenizer-custom:not(.is-cozy):not(.is-condensed),.fd-multi-input-tokenizer-custom[class*=--compact],.fd-multi-input-tokenizer-custom.is-compact{width:calc(100% - 2rem)}.fd-multi-input-input-group-custom{max-width:100%}.fd-multi-input-custom{display:block}.fd-multi-input-item{cursor:pointer;padding:0}.fd-multi-input-popover-size{overflow:auto;display:block}.fd-multi-input-popover-custom.fd-popover-custom{max-width:100%;display:block}.fd-multi-input-show-all{width:100%;display:flex;justify-content:flex-end;background-color:transparent}.fd-multi-input-show-all .fd-link:active{color:inherit}.fd-multi-input-checkbox{width:100%;cursor:pointer}.fd-multi-input-checkbox .fd-checkbox__label{color:inherit}.fd-multi-input-menu-overflow{max-width:37.5rem}.fd-input.fd-multi-input-tokenizer-input{min-width:4rem;margin-top:0;margin-bottom:0;padding-left:0;background-color:transparent}.fd-list--multi-input{max-width:100%}.fd-popover__body--hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.TokenComponent, selector: "fd-token", inputs: ["disabled", "selected", "readOnly", "deleteButtonLabel", "ariaRoleDescription"], outputs: ["onCloseClick", "onRemove", "onTokenClick", "onTokenKeydown", "elementFocused"] }, { kind: "component", type: i4.TokenizerComponent, selector: "fd-tokenizer", inputs: ["class", "disableKeyboardDeletion", "compactCollapse", "tokenizerFocusable", "inputValue", "glyph", "moreTerm", "open"], outputs: ["moreClickedEvent"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i6.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline", "unreadIndicator", "role"], outputs: ["focusEscapeList"] }, { kind: "component", type: i6.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "byline", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i6.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: i7.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i7.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i7.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: i8.InputGroupComponent, selector: "fd-input-group", inputs: ["inputTemplate", "placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledby", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "directive", type: i8.InputGroupInputDirective, selector: "[fdInputGroupInput], [fd-input-group-input]", inputs: ["class"] }, { kind: "component", type: i9.FormControlComponent, selector: "[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "directive", type: i9.InputFormControlDirective, selector: "input[fd-form-control]" }, { kind: "component", type: i10.CheckboxComponent, selector: "fd-checkbox", inputs: ["ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "values", "standalone"], outputs: ["focusChange"] }, { kind: "component", type: i11.LinkComponent, selector: "[fdLink], [fd-link], [fd-breadcrumb-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "directive", type: i2$1.AutoCompleteDirective, selector: "[fdkAutoComplete], [fdAutoComplete], [fd-auto-complete]", inputs: ["options", "inputText", "enable", "matcher", "displayFn"], outputs: ["onComplete"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.SearchHighlightPipe, name: "highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
831
|
+
], viewQueries: [{ propertyName: "popoverRef", first: true, predicate: PopoverComponent, descendants: true }, { propertyName: "controlTemplate", first: true, predicate: ["control"], descendants: true, read: TemplateRef }, { propertyName: "listTemplate", first: true, predicate: ["list"], descendants: true, read: TemplateRef }, { propertyName: "listComponent", first: true, predicate: ListComponent, descendants: true }, { propertyName: "searchInputElement", first: true, predicate: ["searchInputElement"], descendants: true, read: ElementRef }, { propertyName: "tokenizer", first: true, predicate: TokenizerComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"_viewModel$ | async as viewModel\">\n <div class=\"fd-multi-input fd-multi-input-custom\">\n <div class=\"fd-multi-input-field\">\n <ng-container\n [ngTemplateOutlet]=\"control\"\n [ngTemplateOutletContext]=\"{ displayAddonButton: displayAddonButton }\"\n *ngIf=\"mobile\"\n ></ng-container>\n\n <fd-popover\n additionalBodyClass=\"fd-popover-custom-list\"\n *ngIf=\"!mobile\"\n [isOpen]=\"open\"\n (isOpenChange)=\"openChangeHandle($event)\"\n (input)=\"!open && openChangeHandle(true)\"\n [triggers]=\"[]\"\n [maxWidth]=\"_popoverMaxWidth\"\n [disabled]=\"disabled\"\n [fillControlMode]=\"fillControlMode\"\n class=\"fd-multi-input-popover-custom\"\n >\n <fd-popover-control>\n <form (submit)=\"_onSubmit()\">\n <ng-container\n *ngTemplateOutlet=\"control; context: { displayAddonButton: displayAddonButton }\"\n ></ng-container>\n </form>\n </fd-popover-control>\n\n <fd-popover-body\n [attr.aria-hidden]=\"!open\"\n [class.fd-popover__body--hidden]=\"!viewModel.displayedOptions.length\"\n >\n <ng-container *ngTemplateOutlet=\"list\"></ng-container>\n\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n </div>\n </div>\n\n <ng-template #control let-showAddonButton=\"displayAddonButton\">\n <fd-input-group\n class=\"fd-multi-input-input-group-custom\"\n [state]=\"state\"\n [buttonFocusable]=\"buttonFocusable\"\n [button]=\"showAddonButton\"\n [disabled]=\"disabled\"\n [isExpanded]=\"open && !mobile && viewModel.displayedOptions.length > 0\"\n [isControl]=\"true\"\n [glyph]=\"showAddonButton ? glyph : ''\"\n [iconTitle]=\"title\"\n (addOnButtonClicked)=\"_addOnButtonClicked($event)\"\n >\n <span [attr.id]=\"tokenHiddenId\" aria-hidden=\"true\" class=\"fd-multi-input__invisible-text\">{{\n 'coreMultiInput.tokensCountText' | fdTranslate : { length: selected.length }\n }}</span>\n <fd-tokenizer\n #tokenizer\n [compactCollapse]=\"compactCollapse\"\n [open]=\"open\"\n [tokenizerFocusable]=\"false\"\n (moreClickedEvent)=\"_moreClicked()\"\n class=\"fd-multi-input-tokenizer-custom\"\n tabindex=\"-1\"\n >\n <fd-token\n *ngFor=\"let option of viewModel.selectedOptions; trackBy: _trackBy\"\n [disabled]=\"disabled\"\n (onCloseClick)=\"_onTokenClick(option, false, $event)\"\n (onRemove)=\"_onTokenClick(option, false)\"\n >\n <span [innerHtml]=\"option.label\"></span>\n </fd-token>\n\n <input\n type=\"text\"\n class=\"fd-input fd-tokenizer__input fd-multi-input-tokenizer-input\"\n autocomplete=\"off\"\n fd-form-control\n fd-input-group-input\n fdkAutoComplete\n (onComplete)=\"_handleComplete($event)\"\n #searchInputElement\n [displayFn]=\"displayFn\"\n [matcher]=\"typeAheadMatcher\"\n [inputText]=\"_searchTermCtrl.value || ''\"\n [options]=\"dropdownValues\"\n [enable]=\"autoComplete && !mobile\"\n [placeholder]=\"placeholder\"\n [formControl]=\"_searchTermCtrl\"\n [attr.aria-required]=\"required\"\n [ariaLabel]=\"ariaLabel || ('coreMultiInput.multiInputAriaLabel' | fdTranslate)\"\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [attr.aria-describedby]=\"tokenHiddenId\"\n (keydown)=\"_handleInputKeydown($event)\"\n [attr.id]=\"inputId\"\n (focus)=\"tokenizer._showAllTokens()\"\n (blur)=\"tokenizer._hideTokens()\"\n />\n </fd-tokenizer>\n </fd-input-group>\n </ng-template>\n\n <ng-template #list>\n <ul\n *ngIf=\"viewModel.displayedOptions.length\"\n fd-list\n class=\"fd-multi-input-menu-overflow\"\n [selection]=\"true\"\n [mobileMode]=\"mobile\"\n [style.max-height]=\"!mobile ? maxHeight : 'auto'\"\n [byline]=\"byline\"\n (focusEscapeList)=\"handleListFocusEscape($event)\"\n [style.min-width]=\"'100%'\"\n aria-multiselectable=\"true\"\n >\n <li\n *ngFor=\"let option of viewModel.displayedOptions; index as idx; trackBy: _trackBy\"\n fd-list-item\n [attr.aria-label]=\"option.label\"\n (click)=\"_onCheckboxClick(option, $event, idx, true)\"\n (keyup)=\"_onCheckboxKeyup(option, $event, idx)\"\n [selected]=\"!!option.isSelected\"\n >\n <fd-checkbox (click)=\"_onCheckboxClick(option, $event, idx)\" [value]=\"option.isSelected\">\n <!-- TODO -->\n </fd-checkbox>\n\n <ng-container\n [ngTemplateOutlet]=\"itemSource\"\n [ngTemplateOutletContext]=\"{ option: option }\"\n ></ng-container>\n </li>\n\n <li\n *ngIf=\"showAllButton && viewModel.displayedOptions.length < dropdownValues.length\"\n fd-list-item\n class=\"fd-multi-input-show-all\"\n (keyDown)=\"_showAllKeyDown($event)\"\n (click)=\"_showAllClicked($event)\"\n >\n <a fd-link tabindex=\"0\" role=\"button\">Show All ({{ dropdownValues.length }})</a>\n </li>\n </ul>\n </ng-template>\n\n <ng-template let-option=\"option\" #itemSource>\n <span\n *ngIf=\"!itemTemplate\"\n fd-list-title\n [innerHtml]=\"option.label | highlight : _searchTermCtrl.value || '' : highlight\"\n ></span>\n\n <ng-container *ngIf=\"itemTemplate\">\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option.item }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [".fd-multi-input-tokenizer-custom{width:calc(100% - 2.25rem)}[class*=--compact] .fd-multi-input-tokenizer-custom:not([class*=\"--cozy\"]):not([class*=\"--condensed\"]),.is-compact .fd-multi-input-tokenizer-custom:not(.is-cozy):not(.is-condensed),.fd-multi-input-tokenizer-custom[class*=--compact],.fd-multi-input-tokenizer-custom.is-compact{width:calc(100% - 2rem)}.fd-multi-input__invisible-text{display:none!important}.fd-multi-input-input-group-custom{max-width:100%}.fd-multi-input-custom{display:block}.fd-multi-input-item{cursor:pointer;padding:0}.fd-multi-input-popover-size{overflow:auto;display:block}.fd-multi-input-popover-custom.fd-popover-custom{max-width:100%;display:block}.fd-multi-input-show-all{width:100%;display:flex;justify-content:flex-end;background-color:transparent}.fd-multi-input-show-all .fd-link:active{color:inherit}.fd-multi-input-checkbox{width:100%;cursor:pointer}.fd-multi-input-checkbox .fd-checkbox__label{color:inherit}.fd-multi-input-menu-overflow{max-width:37.5rem}.fd-input.fd-multi-input-tokenizer-input{min-width:4rem;margin-top:0;margin-bottom:0;padding-left:0;background-color:transparent}.fd-list--multi-input{max-width:100%}.fd-popover__body--hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.TokenComponent, selector: "fd-token", inputs: ["disabled", "selected", "readOnly", "deleteButtonLabel", "ariaRoleDescription"], outputs: ["onCloseClick", "onRemove", "onTokenClick", "onTokenKeydown", "elementFocused"] }, { kind: "component", type: i4.TokenizerComponent, selector: "fd-tokenizer", inputs: ["class", "disableKeyboardDeletion", "compactCollapse", "tokenizerFocusable", "inputValue", "glyph", "moreTerm", "open"], outputs: ["moreClickedEvent"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i6.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline", "unreadIndicator", "role"], outputs: ["focusEscapeList"] }, { kind: "component", type: i6.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "byline", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i6.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: i7.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i7.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i7.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: i8.InputGroupComponent, selector: "fd-input-group", inputs: ["inputTemplate", "placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledby", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "directive", type: i8.InputGroupInputDirective, selector: "[fdInputGroupInput], [fd-input-group-input]", inputs: ["class"] }, { kind: "component", type: i9.FormControlComponent, selector: "[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "directive", type: i9.InputFormControlDirective, selector: "input[fd-form-control]" }, { kind: "component", type: i10.CheckboxComponent, selector: "fd-checkbox", inputs: ["ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "values", "standalone"], outputs: ["focusChange"] }, { kind: "component", type: i11.LinkComponent, selector: "[fdLink], [fd-link], [fd-breadcrumb-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "directive", type: i2$1.AutoCompleteDirective, selector: "[fdkAutoComplete], [fdAutoComplete], [fd-auto-complete]", inputs: ["options", "inputText", "enable", "matcher", "displayFn"], outputs: ["onComplete"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.SearchHighlightPipe, name: "highlight" }, { kind: "pipe", type: i12.FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
749
832
|
__decorate([
|
|
750
833
|
applyCssClass,
|
|
751
834
|
__metadata("design:type", Function),
|
|
@@ -763,11 +846,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
763
846
|
MenuKeyboardService,
|
|
764
847
|
registerFormItemControl(MultiInputComponent),
|
|
765
848
|
contentDensityObserverProviders()
|
|
766
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"_viewModel$ | async as viewModel\">\n <div class=\"fd-multi-input fd-multi-input-custom\">\n <div class=\"fd-multi-input-field\">\n <ng-container\n [ngTemplateOutlet]=\"control\"\n [ngTemplateOutletContext]=\"{ displayAddonButton: displayAddonButton }\"\n *ngIf=\"mobile\"\n ></ng-container>\n\n <fd-popover\n additionalBodyClass=\"fd-popover-custom-list\"\n *ngIf=\"!mobile\"\n [isOpen]=\"open\"\n (isOpenChange)=\"openChangeHandle($event)\"\n (input)=\"!open && openChangeHandle(true)\"\n [triggers]=\"[]\"\n [maxWidth]=\"_popoverMaxWidth\"\n [disabled]=\"disabled\"\n [fillControlMode]=\"fillControlMode\"\n class=\"fd-multi-input-popover-custom\"\n >\n <fd-popover-control>\n <form (submit)=\"_onSubmit()\">\n <ng-container\n *ngTemplateOutlet=\"control; context: { displayAddonButton: displayAddonButton }\"\n ></ng-container>\n </form>\n </fd-popover-control>\n\n <fd-popover-body\n [attr.aria-hidden]=\"!open\"\n [class.fd-popover__body--hidden]=\"!viewModel.displayedOptions.length\"\n >\n <ng-container *ngTemplateOutlet=\"list\"></ng-container>\n\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n </div>\n </div>\n\n <ng-template #control let-showAddonButton=\"displayAddonButton\">\n <fd-input-group\n class=\"fd-multi-input-input-group-custom\"\n [state]=\"state\"\n [buttonFocusable]=\"buttonFocusable\"\n [button]=\"showAddonButton\"\n [disabled]=\"disabled\"\n [isExpanded]=\"open && !mobile && viewModel.displayedOptions.length > 0\"\n [isControl]=\"true\"\n [glyph]=\"showAddonButton ? glyph : ''\"\n [iconTitle]=\"title\"\n (addOnButtonClicked)=\"_addOnButtonClicked($event)\"\n >\n <fd-tokenizer\n #tokenizer\n [compactCollapse]=\"compactCollapse\"\n [open]=\"open\"\n [tokenizerFocusable]=\"false\"\n (moreClickedEvent)=\"_moreClicked()\"\n class=\"fd-multi-input-tokenizer-custom\"\n tabindex=\"-1\"\n >\n <fd-token\n *ngFor=\"let option of viewModel.selectedOptions; trackBy: _trackBy\"\n [disabled]=\"disabled\"\n (onCloseClick)=\"_onTokenClick(option
|
|
767
|
-
}], ctorParameters: function () { return [{ type: i1$1.ContentDensityObserver }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2$1.DynamicComponentService }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type:
|
|
768
|
-
type: Inject,
|
|
769
|
-
args: [FD_LANGUAGE]
|
|
770
|
-
}] }, { type: i2$1.RtlService, decorators: [{
|
|
849
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"_viewModel$ | async as viewModel\">\n <div class=\"fd-multi-input fd-multi-input-custom\">\n <div class=\"fd-multi-input-field\">\n <ng-container\n [ngTemplateOutlet]=\"control\"\n [ngTemplateOutletContext]=\"{ displayAddonButton: displayAddonButton }\"\n *ngIf=\"mobile\"\n ></ng-container>\n\n <fd-popover\n additionalBodyClass=\"fd-popover-custom-list\"\n *ngIf=\"!mobile\"\n [isOpen]=\"open\"\n (isOpenChange)=\"openChangeHandle($event)\"\n (input)=\"!open && openChangeHandle(true)\"\n [triggers]=\"[]\"\n [maxWidth]=\"_popoverMaxWidth\"\n [disabled]=\"disabled\"\n [fillControlMode]=\"fillControlMode\"\n class=\"fd-multi-input-popover-custom\"\n >\n <fd-popover-control>\n <form (submit)=\"_onSubmit()\">\n <ng-container\n *ngTemplateOutlet=\"control; context: { displayAddonButton: displayAddonButton }\"\n ></ng-container>\n </form>\n </fd-popover-control>\n\n <fd-popover-body\n [attr.aria-hidden]=\"!open\"\n [class.fd-popover__body--hidden]=\"!viewModel.displayedOptions.length\"\n >\n <ng-container *ngTemplateOutlet=\"list\"></ng-container>\n\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n </div>\n </div>\n\n <ng-template #control let-showAddonButton=\"displayAddonButton\">\n <fd-input-group\n class=\"fd-multi-input-input-group-custom\"\n [state]=\"state\"\n [buttonFocusable]=\"buttonFocusable\"\n [button]=\"showAddonButton\"\n [disabled]=\"disabled\"\n [isExpanded]=\"open && !mobile && viewModel.displayedOptions.length > 0\"\n [isControl]=\"true\"\n [glyph]=\"showAddonButton ? glyph : ''\"\n [iconTitle]=\"title\"\n (addOnButtonClicked)=\"_addOnButtonClicked($event)\"\n >\n <span [attr.id]=\"tokenHiddenId\" aria-hidden=\"true\" class=\"fd-multi-input__invisible-text\">{{\n 'coreMultiInput.tokensCountText' | fdTranslate : { length: selected.length }\n }}</span>\n <fd-tokenizer\n #tokenizer\n [compactCollapse]=\"compactCollapse\"\n [open]=\"open\"\n [tokenizerFocusable]=\"false\"\n (moreClickedEvent)=\"_moreClicked()\"\n class=\"fd-multi-input-tokenizer-custom\"\n tabindex=\"-1\"\n >\n <fd-token\n *ngFor=\"let option of viewModel.selectedOptions; trackBy: _trackBy\"\n [disabled]=\"disabled\"\n (onCloseClick)=\"_onTokenClick(option, false, $event)\"\n (onRemove)=\"_onTokenClick(option, false)\"\n >\n <span [innerHtml]=\"option.label\"></span>\n </fd-token>\n\n <input\n type=\"text\"\n class=\"fd-input fd-tokenizer__input fd-multi-input-tokenizer-input\"\n autocomplete=\"off\"\n fd-form-control\n fd-input-group-input\n fdkAutoComplete\n (onComplete)=\"_handleComplete($event)\"\n #searchInputElement\n [displayFn]=\"displayFn\"\n [matcher]=\"typeAheadMatcher\"\n [inputText]=\"_searchTermCtrl.value || ''\"\n [options]=\"dropdownValues\"\n [enable]=\"autoComplete && !mobile\"\n [placeholder]=\"placeholder\"\n [formControl]=\"_searchTermCtrl\"\n [attr.aria-required]=\"required\"\n [ariaLabel]=\"ariaLabel || ('coreMultiInput.multiInputAriaLabel' | fdTranslate)\"\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [attr.aria-describedby]=\"tokenHiddenId\"\n (keydown)=\"_handleInputKeydown($event)\"\n [attr.id]=\"inputId\"\n (focus)=\"tokenizer._showAllTokens()\"\n (blur)=\"tokenizer._hideTokens()\"\n />\n </fd-tokenizer>\n </fd-input-group>\n </ng-template>\n\n <ng-template #list>\n <ul\n *ngIf=\"viewModel.displayedOptions.length\"\n fd-list\n class=\"fd-multi-input-menu-overflow\"\n [selection]=\"true\"\n [mobileMode]=\"mobile\"\n [style.max-height]=\"!mobile ? maxHeight : 'auto'\"\n [byline]=\"byline\"\n (focusEscapeList)=\"handleListFocusEscape($event)\"\n [style.min-width]=\"'100%'\"\n aria-multiselectable=\"true\"\n >\n <li\n *ngFor=\"let option of viewModel.displayedOptions; index as idx; trackBy: _trackBy\"\n fd-list-item\n [attr.aria-label]=\"option.label\"\n (click)=\"_onCheckboxClick(option, $event, idx, true)\"\n (keyup)=\"_onCheckboxKeyup(option, $event, idx)\"\n [selected]=\"!!option.isSelected\"\n >\n <fd-checkbox (click)=\"_onCheckboxClick(option, $event, idx)\" [value]=\"option.isSelected\">\n <!-- TODO -->\n </fd-checkbox>\n\n <ng-container\n [ngTemplateOutlet]=\"itemSource\"\n [ngTemplateOutletContext]=\"{ option: option }\"\n ></ng-container>\n </li>\n\n <li\n *ngIf=\"showAllButton && viewModel.displayedOptions.length < dropdownValues.length\"\n fd-list-item\n class=\"fd-multi-input-show-all\"\n (keyDown)=\"_showAllKeyDown($event)\"\n (click)=\"_showAllClicked($event)\"\n >\n <a fd-link tabindex=\"0\" role=\"button\">Show All ({{ dropdownValues.length }})</a>\n </li>\n </ul>\n </ng-template>\n\n <ng-template let-option=\"option\" #itemSource>\n <span\n *ngIf=\"!itemTemplate\"\n fd-list-title\n [innerHtml]=\"option.label | highlight : _searchTermCtrl.value || '' : highlight\"\n ></span>\n\n <ng-container *ngIf=\"itemTemplate\">\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option.item }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [".fd-multi-input-tokenizer-custom{width:calc(100% - 2.25rem)}[class*=--compact] .fd-multi-input-tokenizer-custom:not([class*=\"--cozy\"]):not([class*=\"--condensed\"]),.is-compact .fd-multi-input-tokenizer-custom:not(.is-cozy):not(.is-condensed),.fd-multi-input-tokenizer-custom[class*=--compact],.fd-multi-input-tokenizer-custom.is-compact{width:calc(100% - 2rem)}.fd-multi-input__invisible-text{display:none!important}.fd-multi-input-input-group-custom{max-width:100%}.fd-multi-input-custom{display:block}.fd-multi-input-item{cursor:pointer;padding:0}.fd-multi-input-popover-size{overflow:auto;display:block}.fd-multi-input-popover-custom.fd-popover-custom{max-width:100%;display:block}.fd-multi-input-show-all{width:100%;display:flex;justify-content:flex-end;background-color:transparent}.fd-multi-input-show-all .fd-link:active{color:inherit}.fd-multi-input-checkbox{width:100%;cursor:pointer}.fd-multi-input-checkbox .fd-checkbox__label{color:inherit}.fd-multi-input-menu-overflow{max-width:37.5rem}.fd-input.fd-multi-input-tokenizer-input{min-width:4rem;margin-top:0;margin-bottom:0;padding-left:0;background-color:transparent}.fd-list--multi-input{max-width:100%}.fd-popover__body--hidden{display:none}\n"] }]
|
|
850
|
+
}], ctorParameters: function () { return [{ type: i1$1.ContentDensityObserver }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2$1.DynamicComponentService }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: i2$1.RtlService, decorators: [{
|
|
771
851
|
type: Optional
|
|
772
852
|
}] }, { type: i2$1.FocusTrapService, decorators: [{
|
|
773
853
|
type: Optional
|
|
@@ -805,6 +885,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
805
885
|
type: Input
|
|
806
886
|
}], newTokenParseFn: [{
|
|
807
887
|
type: Input
|
|
888
|
+
}], optionItemIdentifier: [{
|
|
889
|
+
type: Input
|
|
808
890
|
}], newTokenValidateFn: [{
|
|
809
891
|
type: Input
|
|
810
892
|
}], ariaLabel: [{
|
|
@@ -845,6 +927,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
845
927
|
type: Input
|
|
846
928
|
}], displayAddonButton: [{
|
|
847
929
|
type: Input
|
|
930
|
+
}], tokenHiddenId: [{
|
|
931
|
+
type: Input
|
|
848
932
|
}], openChange: [{
|
|
849
933
|
type: Output
|
|
850
934
|
}], addOnButtonClicked: [{
|
|
@@ -874,33 +958,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
874
958
|
args: ['focusout', ['$event']]
|
|
875
959
|
}] } });
|
|
876
960
|
|
|
877
|
-
class DeprecatedMultiInputCompactDirective extends DeprecatedCompactDirective {
|
|
878
|
-
/** @hidden */
|
|
879
|
-
constructor() {
|
|
880
|
-
super('fd-multi-input');
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
DeprecatedMultiInputCompactDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedMultiInputCompactDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
884
|
-
DeprecatedMultiInputCompactDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedMultiInputCompactDirective, selector: "fd-multi-input[compact]", providers: [
|
|
885
|
-
{
|
|
886
|
-
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
887
|
-
useExisting: forwardRef(() => DeprecatedMultiInputCompactDirective)
|
|
888
|
-
}
|
|
889
|
-
], usesInheritance: true, ngImport: i0 });
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedMultiInputCompactDirective, decorators: [{
|
|
891
|
-
type: Directive,
|
|
892
|
-
args: [{
|
|
893
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
894
|
-
selector: 'fd-multi-input[compact]',
|
|
895
|
-
providers: [
|
|
896
|
-
{
|
|
897
|
-
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
898
|
-
useExisting: forwardRef(() => DeprecatedMultiInputCompactDirective)
|
|
899
|
-
}
|
|
900
|
-
]
|
|
901
|
-
}]
|
|
902
|
-
}], ctorParameters: function () { return []; } });
|
|
903
|
-
|
|
904
961
|
class MultiInputModule {
|
|
905
962
|
}
|
|
906
963
|
MultiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -916,7 +973,8 @@ MultiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
916
973
|
CheckboxModule,
|
|
917
974
|
LinkModule,
|
|
918
975
|
AutoCompleteModule,
|
|
919
|
-
ContentDensityModule
|
|
976
|
+
ContentDensityModule,
|
|
977
|
+
I18nModule], exports: [MultiInputComponent, DeprecatedMultiInputCompactDirective, ContentDensityModule] });
|
|
920
978
|
MultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputModule, imports: [CommonModule,
|
|
921
979
|
TokenModule,
|
|
922
980
|
FormsModule,
|
|
@@ -929,7 +987,8 @@ MultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
929
987
|
CheckboxModule,
|
|
930
988
|
LinkModule,
|
|
931
989
|
AutoCompleteModule,
|
|
932
|
-
ContentDensityModule,
|
|
990
|
+
ContentDensityModule,
|
|
991
|
+
I18nModule, ContentDensityModule] });
|
|
933
992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputModule, decorators: [{
|
|
934
993
|
type: NgModule,
|
|
935
994
|
args: [{
|
|
@@ -947,7 +1006,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
947
1006
|
CheckboxModule,
|
|
948
1007
|
LinkModule,
|
|
949
1008
|
AutoCompleteModule,
|
|
950
|
-
ContentDensityModule
|
|
1009
|
+
ContentDensityModule,
|
|
1010
|
+
I18nModule
|
|
951
1011
|
],
|
|
952
1012
|
exports: [MultiInputComponent, DeprecatedMultiInputCompactDirective, ContentDensityModule]
|
|
953
1013
|
}]
|