@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 { __awaiter, __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 { MobileModeBase, MobileModeControl, MOBILE_MODE_CONFIG } from '@fundamental-ngx/core/mobile-mode';
|
|
28
34
|
import * as i1 from '@fundamental-ngx/core/dialog';
|
|
29
35
|
import { DialogModule } from '@fundamental-ngx/core/dialog';
|
|
@@ -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
|
|
|
@@ -131,12 +158,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
131
158
|
}]
|
|
132
159
|
}] });
|
|
133
160
|
|
|
161
|
+
class PairSelectionModel {
|
|
162
|
+
constructor() {
|
|
163
|
+
/** @hidden */
|
|
164
|
+
this._selected = new Map();
|
|
165
|
+
/** Event emitted when the selection has changed. */
|
|
166
|
+
this.selectionChanged = new EventEmitter();
|
|
167
|
+
}
|
|
168
|
+
/** Array of selected items */
|
|
169
|
+
get selected() {
|
|
170
|
+
return [...this._selected.values()];
|
|
171
|
+
}
|
|
172
|
+
/** Whether the given key exists in the record */
|
|
173
|
+
isSelected(key) {
|
|
174
|
+
return this._selected.has(key);
|
|
175
|
+
}
|
|
176
|
+
/** Selects the given key-value pair */
|
|
177
|
+
select(keyOrValues, value) {
|
|
178
|
+
if (value) {
|
|
179
|
+
this._selected.set(keyOrValues, value);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
keyOrValues.forEach(([key, v]) => this._selected.set(key, v));
|
|
183
|
+
}
|
|
184
|
+
this.selectionChanged.emit([...this._selected]);
|
|
185
|
+
}
|
|
186
|
+
/** Deselects the given key */
|
|
187
|
+
deselect(key) {
|
|
188
|
+
this._selected.delete(key);
|
|
189
|
+
this.selectionChanged.emit([...this._selected]);
|
|
190
|
+
}
|
|
191
|
+
/** Clears the selection information */
|
|
192
|
+
clear() {
|
|
193
|
+
this._selected.clear();
|
|
194
|
+
this.selectionChanged.emit([...this._selected]);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
134
198
|
function isOptionItem(candidate) {
|
|
135
|
-
return isOptionItemBase(candidate) && 'item' in candidate;
|
|
199
|
+
return isOptionItemBase(candidate) && 'item' in candidate && 'id' in candidate;
|
|
136
200
|
}
|
|
137
201
|
function isOptionItemBase(candidate) {
|
|
138
202
|
return typeof candidate === 'object' && candidate !== null && 'value' in candidate && 'label' in candidate;
|
|
139
203
|
}
|
|
204
|
+
let uniqueHiddenLabel = 0;
|
|
140
205
|
/**
|
|
141
206
|
* Input field with multiple selection enabled. Should be used when a user can select between a
|
|
142
207
|
* limited number of pre-defined options with a filter-enabled context.
|
|
@@ -155,10 +220,21 @@ class MultiInputComponent {
|
|
|
155
220
|
/** Selected dropdown items. */
|
|
156
221
|
set selected(values) {
|
|
157
222
|
this._selectionModel.clear();
|
|
158
|
-
|
|
223
|
+
if (values) {
|
|
224
|
+
const potentialItems = [...values];
|
|
225
|
+
const options = [];
|
|
226
|
+
potentialItems.forEach((value) => {
|
|
227
|
+
let optionItem = this._optionItems.find((i) => i.value === value);
|
|
228
|
+
if (!optionItem) {
|
|
229
|
+
optionItem = this._getOptionItem(value);
|
|
230
|
+
}
|
|
231
|
+
options.push(optionItem);
|
|
232
|
+
});
|
|
233
|
+
this._selectionModel.select(options.map((item) => [item.id, item]));
|
|
234
|
+
}
|
|
159
235
|
}
|
|
160
236
|
get selected() {
|
|
161
|
-
return this._selectionModel.selected;
|
|
237
|
+
return this._selectionModel.selected.map((c) => c.value);
|
|
162
238
|
}
|
|
163
239
|
/** @hidden */
|
|
164
240
|
get _popoverMaxWidth() {
|
|
@@ -170,6 +246,10 @@ class MultiInputComponent {
|
|
|
170
246
|
}
|
|
171
247
|
return this.elementRef.nativeElement.getBoundingClientRect().width;
|
|
172
248
|
}
|
|
249
|
+
/** @hidden */
|
|
250
|
+
get _optionItems() {
|
|
251
|
+
return this.optionItems$.value;
|
|
252
|
+
}
|
|
173
253
|
/** typeahead matcher function */
|
|
174
254
|
get typeAheadMatcher() {
|
|
175
255
|
if (this.includes) {
|
|
@@ -178,14 +258,13 @@ class MultiInputComponent {
|
|
|
178
258
|
return (item, searchTerm) => item.startsWith(searchTerm);
|
|
179
259
|
}
|
|
180
260
|
/** @hidden */
|
|
181
|
-
constructor(_contentDensityObserver, elementRef, _changeDetRef, _dynamicComponentService, _injector, _viewContainerRef,
|
|
261
|
+
constructor(_contentDensityObserver, elementRef, _changeDetRef, _dynamicComponentService, _injector, _viewContainerRef, _rtlService, _focusTrapService) {
|
|
182
262
|
this._contentDensityObserver = _contentDensityObserver;
|
|
183
263
|
this.elementRef = elementRef;
|
|
184
264
|
this._changeDetRef = _changeDetRef;
|
|
185
265
|
this._dynamicComponentService = _dynamicComponentService;
|
|
186
266
|
this._injector = _injector;
|
|
187
267
|
this._viewContainerRef = _viewContainerRef;
|
|
188
|
-
this._language = _language;
|
|
189
268
|
this._rtlService = _rtlService;
|
|
190
269
|
this._focusTrapService = _focusTrapService;
|
|
191
270
|
/** Placeholder for the input field. */
|
|
@@ -283,6 +362,10 @@ class MultiInputComponent {
|
|
|
283
362
|
this.open = false;
|
|
284
363
|
/** Whether or not to display the addon button. */
|
|
285
364
|
this.displayAddonButton = true;
|
|
365
|
+
/** @hidden */
|
|
366
|
+
this._tokenCountHiddenLabel = `fd-multi-input-token-count-id-${uniqueHiddenLabel++}`;
|
|
367
|
+
/** token count hidden label */
|
|
368
|
+
this.tokenHiddenId = this._tokenCountHiddenLabel;
|
|
286
369
|
/** Event emitted, when the multi input's popover body is opened or closed */
|
|
287
370
|
this.openChange = new EventEmitter();
|
|
288
371
|
/** Emits event when the addon button is clicked. */
|
|
@@ -294,7 +377,7 @@ class MultiInputComponent {
|
|
|
294
377
|
/** @hidden */
|
|
295
378
|
this._searchTermCtrl = new FormControl('');
|
|
296
379
|
/** @hidden */
|
|
297
|
-
this._selectionModel = new
|
|
380
|
+
this._selectionModel = new PairSelectionModel();
|
|
298
381
|
/** @hidden */
|
|
299
382
|
this._viewModel$ = this._getViewModel();
|
|
300
383
|
/** @hidden */
|
|
@@ -302,8 +385,6 @@ class MultiInputComponent {
|
|
|
302
385
|
/** @hidden */
|
|
303
386
|
this._rangeSelector = new RangeSelector();
|
|
304
387
|
/** @hidden */
|
|
305
|
-
this._translationResolver = new TranslationResolver();
|
|
306
|
-
/** @hidden */
|
|
307
388
|
this._trackBy = (index, optionItem) => this.valueFn(optionItem === null || optionItem === void 0 ? void 0 : optionItem.item);
|
|
308
389
|
/** @hidden */
|
|
309
390
|
this.onChange = () => { };
|
|
@@ -349,9 +430,6 @@ class MultiInputComponent {
|
|
|
349
430
|
this._subscriptions.add(this._getViewModel()
|
|
350
431
|
.pipe(map((viewModel) => !viewModel.displayedOptions.some((c) => !c.isSelected)))
|
|
351
432
|
.subscribe((allItemsSelected) => this.allItemsSelectedChange.emit(allItemsSelected)));
|
|
352
|
-
this._subscriptions.add(this._language.subscribe(() => {
|
|
353
|
-
this._getAriaLabel();
|
|
354
|
-
}));
|
|
355
433
|
}
|
|
356
434
|
/** @hidden */
|
|
357
435
|
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,18 +525,18 @@ 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
|
-
_onCheckboxClick(
|
|
534
|
+
_onCheckboxClick(option, event, index, isListItem = false) {
|
|
457
535
|
return __awaiter(this, void 0, void 0, function* () {
|
|
458
|
-
const toggledSelection = !this._selectionModel.isSelected(
|
|
536
|
+
const toggledSelection = !this._selectionModel.isSelected(option.id);
|
|
459
537
|
this._rangeSelector.onRangeElementToggled(index, event);
|
|
460
538
|
const sub = this._viewModel$.pipe(first()).subscribe((vm) => {
|
|
461
|
-
this._rangeSelector.applyValueToEachInRange((idx) => this._handleSelect(toggledSelection, vm.displayedOptions[idx]
|
|
539
|
+
this._rangeSelector.applyValueToEachInRange((idx) => this._handleSelect(toggledSelection, vm.displayedOptions[idx], false));
|
|
462
540
|
this._changeDetRef.detectChanges();
|
|
463
541
|
});
|
|
464
542
|
this._subscriptions.add(sub);
|
|
@@ -472,18 +550,18 @@ class MultiInputComponent {
|
|
|
472
550
|
});
|
|
473
551
|
}
|
|
474
552
|
/** @hidden */
|
|
475
|
-
_onTokenClick(
|
|
553
|
+
_onTokenClick(option, resetSearch, event) {
|
|
476
554
|
event === null || event === void 0 ? void 0 : event.preventDefault(); // prevent this function from being called twice when checkbox updates
|
|
477
|
-
this._handleSelect(false,
|
|
555
|
+
this._handleSelect(false, option, resetSearch, true);
|
|
478
556
|
}
|
|
479
557
|
/** @hidden */
|
|
480
|
-
_handleSelect(checked,
|
|
558
|
+
_handleSelect(checked, option, resetSearch = true, fromTokenCloseClick = false) {
|
|
481
559
|
const previousLength = this._selectionModel.selected.length;
|
|
482
560
|
if (checked) {
|
|
483
|
-
this._selectionModel.select(
|
|
561
|
+
this._selectionModel.select(option.id, option);
|
|
484
562
|
}
|
|
485
563
|
else {
|
|
486
|
-
this._selectionModel.deselect(
|
|
564
|
+
this._selectionModel.deselect(option.id);
|
|
487
565
|
}
|
|
488
566
|
// Handle popover placement update
|
|
489
567
|
if (this._shouldPopoverBeUpdated(previousLength, this._selectionModel.selected.length)) {
|
|
@@ -607,14 +685,14 @@ class MultiInputComponent {
|
|
|
607
685
|
_addNewTokenToDropDownValues(newToken) {
|
|
608
686
|
this.dropdownValues.push(newToken);
|
|
609
687
|
const newOption = this._getOptionItem(newToken);
|
|
610
|
-
this.optionItems$.next([...this.
|
|
688
|
+
this.optionItems$.next([...this._optionItems, newOption]);
|
|
611
689
|
}
|
|
612
690
|
/** @hidden */
|
|
613
691
|
_selectFirstFiltered(searchTerm) {
|
|
614
692
|
const filtered = this.filterFn(this.dropdownValues, searchTerm);
|
|
615
693
|
if (Array.isArray(filtered) && filtered.length > 0 && this.autoComplete) {
|
|
616
694
|
const optionItem = this._getOptionItem(filtered[0]);
|
|
617
|
-
this._handleSelect(true, optionItem
|
|
695
|
+
this._handleSelect(true, optionItem);
|
|
618
696
|
this._searchTermCtrl.setValue('');
|
|
619
697
|
this.open = false;
|
|
620
698
|
return true;
|
|
@@ -626,8 +704,8 @@ class MultiInputComponent {
|
|
|
626
704
|
const searchLower = searchTerm.toLocaleLowerCase();
|
|
627
705
|
return contentArray.filter((item) => {
|
|
628
706
|
if (item) {
|
|
629
|
-
const displayedValue = this.displayFn(item);
|
|
630
|
-
const term =
|
|
707
|
+
const displayedValue = isOptionItem(item) ? item.label : this.displayFn(item);
|
|
708
|
+
const term = (displayedValue === null || displayedValue === void 0 ? void 0 : displayedValue.toLocaleLowerCase()) || '';
|
|
631
709
|
return this.typeAheadMatcher(term, searchLower);
|
|
632
710
|
}
|
|
633
711
|
});
|
|
@@ -660,7 +738,7 @@ class MultiInputComponent {
|
|
|
660
738
|
/** @hidden */
|
|
661
739
|
_propagateChange(emitInMobile) {
|
|
662
740
|
if (!this.mobile || emitInMobile) {
|
|
663
|
-
const selected =
|
|
741
|
+
const selected = this._selectionModel.selected.map((c) => c.value);
|
|
664
742
|
this.onChange(selected);
|
|
665
743
|
this.selectedChange.emit(selected);
|
|
666
744
|
}
|
|
@@ -684,6 +762,20 @@ class MultiInputComponent {
|
|
|
684
762
|
});
|
|
685
763
|
}
|
|
686
764
|
/** @hidden */
|
|
765
|
+
_getItemIdentifier(item) {
|
|
766
|
+
if (!this.optionItemIdentifier) {
|
|
767
|
+
const value = this.valueFn(item);
|
|
768
|
+
if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'symbol' && isDevMode()) {
|
|
769
|
+
console.warn('optionItemIdentifier is not set and valueFn does not return a string, number or symbol', item);
|
|
770
|
+
}
|
|
771
|
+
return value;
|
|
772
|
+
}
|
|
773
|
+
if (typeof this.optionItemIdentifier === 'function') {
|
|
774
|
+
return this.optionItemIdentifier(item);
|
|
775
|
+
}
|
|
776
|
+
return get(item, this.optionItemIdentifier);
|
|
777
|
+
}
|
|
778
|
+
/** @hidden */
|
|
687
779
|
_resetSearchTerm() {
|
|
688
780
|
this._searchTermCtrl.setValue('');
|
|
689
781
|
this._changeDetRef.detectChanges();
|
|
@@ -695,6 +787,7 @@ class MultiInputComponent {
|
|
|
695
787
|
}
|
|
696
788
|
const { label, value } = this._getValueAndLabelOfItem(item);
|
|
697
789
|
return {
|
|
790
|
+
id: this._getItemIdentifier(item),
|
|
698
791
|
item,
|
|
699
792
|
label,
|
|
700
793
|
value,
|
|
@@ -718,36 +811,24 @@ class MultiInputComponent {
|
|
|
718
811
|
return { label, value };
|
|
719
812
|
}
|
|
720
813
|
/** @hidden */
|
|
721
|
-
_getOptionItemByValue(value, optionItems = []) {
|
|
722
|
-
return optionItems.find((c) => c.value === value);
|
|
723
|
-
}
|
|
724
|
-
/** @hidden */
|
|
725
814
|
_getViewModel() {
|
|
726
815
|
return combineLatest([
|
|
727
816
|
this._searchTermCtrl.valueChanges.pipe(startWith(this._searchTermCtrl.value)),
|
|
728
|
-
this._selectionModel.
|
|
817
|
+
this._selectionModel.selectionChanged.pipe(startWith(null)),
|
|
729
818
|
this.optionItems$
|
|
730
|
-
]).pipe(map((
|
|
819
|
+
]).pipe(map(() => {
|
|
731
820
|
var _a;
|
|
732
|
-
const selected = this.selected.map((v) => this._getOptionItemByValue(v, optionItems) || this._getOptionItem(v));
|
|
733
821
|
// not using "searchTerm" value from combineLatest as it will be wrong for late subscribers, if any
|
|
734
822
|
const searchTerm = (_a = this._searchTermCtrl.value) !== null && _a !== void 0 ? _a : '';
|
|
735
|
-
const filtered = this.filterFn(
|
|
823
|
+
const filtered = this.filterFn(this.dropdownValues, searchTerm);
|
|
736
824
|
const displayedOptions = (Array.isArray(filtered) ? filtered : []).map((item) => this._getOptionItem(item));
|
|
737
|
-
displayedOptions.forEach((c) => (c.isSelected =
|
|
738
|
-
return { selectedOptions: selected, displayedOptions };
|
|
825
|
+
displayedOptions.forEach((c) => (c.isSelected = this._selectionModel.isSelected(c.id)));
|
|
826
|
+
return { selectedOptions: this._selectionModel.selected, displayedOptions };
|
|
739
827
|
}));
|
|
740
828
|
}
|
|
741
|
-
/** @hidden */
|
|
742
|
-
_getAriaLabel() {
|
|
743
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
744
|
-
const lang = yield firstValueFrom(this._language);
|
|
745
|
-
this._defaultAriaLabel = this._translationResolver.resolve(lang, 'coreMultiInput.multiInputAriaLabel');
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
829
|
}
|
|
749
|
-
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:
|
|
750
|
-
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: [
|
|
830
|
+
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 });
|
|
831
|
+
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: [
|
|
751
832
|
{
|
|
752
833
|
provide: NG_VALUE_ACCESSOR,
|
|
753
834
|
useExisting: forwardRef(() => MultiInputComponent),
|
|
@@ -756,7 +837,7 @@ MultiInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
756
837
|
MenuKeyboardService,
|
|
757
838
|
registerFormItemControl(MultiInputComponent),
|
|
758
839
|
contentDensityObserverProviders()
|
|
759
|
-
], 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 });
|
|
840
|
+
], 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 });
|
|
760
841
|
__decorate([
|
|
761
842
|
applyCssClass,
|
|
762
843
|
__metadata("design:type", Function),
|
|
@@ -774,12 +855,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
774
855
|
MenuKeyboardService,
|
|
775
856
|
registerFormItemControl(MultiInputComponent),
|
|
776
857
|
contentDensityObserverProviders()
|
|
777
|
-
], 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
|
|
858
|
+
], 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"] }]
|
|
778
859
|
}], ctorParameters: function () {
|
|
779
|
-
return [{ type: i1$1.ContentDensityObserver }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2$1.DynamicComponentService }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type:
|
|
780
|
-
type: Inject,
|
|
781
|
-
args: [FD_LANGUAGE]
|
|
782
|
-
}] }, { type: i2$1.RtlService, decorators: [{
|
|
860
|
+
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: [{
|
|
783
861
|
type: Optional
|
|
784
862
|
}] }, { type: i2$1.FocusTrapService, decorators: [{
|
|
785
863
|
type: Optional
|
|
@@ -818,6 +896,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
818
896
|
type: Input
|
|
819
897
|
}], newTokenParseFn: [{
|
|
820
898
|
type: Input
|
|
899
|
+
}], optionItemIdentifier: [{
|
|
900
|
+
type: Input
|
|
821
901
|
}], newTokenValidateFn: [{
|
|
822
902
|
type: Input
|
|
823
903
|
}], ariaLabel: [{
|
|
@@ -858,6 +938,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
858
938
|
type: Input
|
|
859
939
|
}], displayAddonButton: [{
|
|
860
940
|
type: Input
|
|
941
|
+
}], tokenHiddenId: [{
|
|
942
|
+
type: Input
|
|
861
943
|
}], openChange: [{
|
|
862
944
|
type: Output
|
|
863
945
|
}], addOnButtonClicked: [{
|
|
@@ -887,33 +969,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
887
969
|
args: ['focusout', ['$event']]
|
|
888
970
|
}] } });
|
|
889
971
|
|
|
890
|
-
class DeprecatedMultiInputCompactDirective extends DeprecatedCompactDirective {
|
|
891
|
-
/** @hidden */
|
|
892
|
-
constructor() {
|
|
893
|
-
super('fd-multi-input');
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
DeprecatedMultiInputCompactDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedMultiInputCompactDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
897
|
-
DeprecatedMultiInputCompactDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedMultiInputCompactDirective, selector: "fd-multi-input[compact]", providers: [
|
|
898
|
-
{
|
|
899
|
-
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
900
|
-
useExisting: forwardRef(() => DeprecatedMultiInputCompactDirective)
|
|
901
|
-
}
|
|
902
|
-
], usesInheritance: true, ngImport: i0 });
|
|
903
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedMultiInputCompactDirective, decorators: [{
|
|
904
|
-
type: Directive,
|
|
905
|
-
args: [{
|
|
906
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
907
|
-
selector: 'fd-multi-input[compact]',
|
|
908
|
-
providers: [
|
|
909
|
-
{
|
|
910
|
-
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
911
|
-
useExisting: forwardRef(() => DeprecatedMultiInputCompactDirective)
|
|
912
|
-
}
|
|
913
|
-
]
|
|
914
|
-
}]
|
|
915
|
-
}], ctorParameters: function () { return []; } });
|
|
916
|
-
|
|
917
972
|
class MultiInputModule {
|
|
918
973
|
}
|
|
919
974
|
MultiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -929,7 +984,8 @@ MultiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
929
984
|
CheckboxModule,
|
|
930
985
|
LinkModule,
|
|
931
986
|
AutoCompleteModule,
|
|
932
|
-
ContentDensityModule
|
|
987
|
+
ContentDensityModule,
|
|
988
|
+
I18nModule], exports: [MultiInputComponent, DeprecatedMultiInputCompactDirective, ContentDensityModule] });
|
|
933
989
|
MultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputModule, imports: [CommonModule,
|
|
934
990
|
TokenModule,
|
|
935
991
|
FormsModule,
|
|
@@ -942,7 +998,8 @@ MultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
942
998
|
CheckboxModule,
|
|
943
999
|
LinkModule,
|
|
944
1000
|
AutoCompleteModule,
|
|
945
|
-
ContentDensityModule,
|
|
1001
|
+
ContentDensityModule,
|
|
1002
|
+
I18nModule, ContentDensityModule] });
|
|
946
1003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputModule, decorators: [{
|
|
947
1004
|
type: NgModule,
|
|
948
1005
|
args: [{
|
|
@@ -960,7 +1017,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
960
1017
|
CheckboxModule,
|
|
961
1018
|
LinkModule,
|
|
962
1019
|
AutoCompleteModule,
|
|
963
|
-
ContentDensityModule
|
|
1020
|
+
ContentDensityModule,
|
|
1021
|
+
I18nModule
|
|
964
1022
|
],
|
|
965
1023
|
exports: [MultiInputComponent, DeprecatedMultiInputCompactDirective, ContentDensityModule]
|
|
966
1024
|
}]
|