@fundamental-ngx/core 0.43.5 → 0.43.7
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/button/base-button.d.ts +3 -1
- package/button/button.component.d.ts +5 -0
- package/esm2020/button/base-button.mjs +4 -2
- package/esm2020/button/button.component.mjs +19 -5
- package/esm2020/combobox/combobox.component.mjs +1 -1
- package/esm2020/multi-combobox/multi-combobox.component.mjs +1 -1
- package/esm2020/multi-input/multi-input-mobile/multi-input-mobile.component.mjs +3 -3
- package/esm2020/multi-input/multi-input.component.mjs +67 -35
- package/esm2020/popover/index.mjs +12 -12
- package/esm2020/popover/popover-body/popover-body-directives/popover-body-footer.directive.mjs +4 -3
- package/esm2020/popover/popover-body/popover-body-directives/popover-body-header.directive.mjs +4 -3
- package/esm2020/popover/popover-body/popover-body.component.mjs +8 -11
- package/esm2020/popover/popover-body.directive.mjs +20 -0
- package/esm2020/popover/popover-container/popover-container.directive.mjs +4 -3
- package/esm2020/popover/popover-control/popover-control.component.mjs +3 -3
- package/esm2020/popover/popover-mobile/popover-mobile.component.mjs +10 -7
- package/esm2020/popover/popover-mobile/popover-mobile.module.mjs +4 -5
- package/esm2020/popover/popover-service/popover.service.mjs +20 -14
- package/esm2020/popover/popover-trigger.directive.mjs +4 -3
- package/esm2020/popover/popover.component.mjs +29 -16
- package/esm2020/popover/popover.module.mjs +20 -18
- package/fesm2015/fundamental-ngx-core-button.mjs +21 -5
- package/fesm2015/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-combobox.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-multi-combobox.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-multi-input.mjs +69 -37
- package/fesm2015/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-popover.mjs +440 -399
- package/fesm2015/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-button.mjs +21 -5
- package/fesm2020/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-combobox.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-multi-combobox.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-multi-input.mjs +68 -36
- package/fesm2020/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-popover.mjs +449 -408
- package/fesm2020/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fundamental-ngx-core-v0.43.7.tgz +0 -0
- package/multi-input/multi-input.component.d.ts +42 -33
- package/package.json +3 -3
- package/popover/index.d.ts +11 -11
- package/popover/popover-body/popover-body-directives/popover-body-footer.directive.d.ts +1 -1
- package/popover/popover-body/popover-body-directives/popover-body-header.directive.d.ts +1 -1
- package/popover/popover-body/popover-body.component.d.ts +1 -1
- package/popover/popover-body.directive.d.ts +10 -0
- package/popover/popover-container/popover-container.directive.d.ts +1 -1
- package/popover/popover-control/popover-control.component.d.ts +1 -1
- package/popover/popover-mobile/popover-mobile.component.d.ts +3 -3
- package/popover/popover-mobile/popover-mobile.module.d.ts +5 -5
- package/popover/popover-service/popover.service.d.ts +6 -4
- package/popover/popover-trigger.directive.d.ts +1 -1
- package/popover/popover.component.d.ts +9 -2
- package/popover/popover.module.d.ts +2 -5
- package/schematics/add-dependencies/index.js +4 -4
- package/fundamental-ngx-core-v0.43.5.tgz +0 -0
|
@@ -98,10 +98,10 @@ class MultiInputMobileComponent extends MobileModeBase {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
MultiInputMobileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputMobileComponent, deps: [{ token: i0.ElementRef }, { token: i1.DialogService }, { token: MULTI_INPUT_COMPONENT }, { token: MOBILE_MODE_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
101
|
-
MultiInputMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: MultiInputMobileComponent, selector: "fd-multi-input-mobile", viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <h1 fd-title *ngIf=\"mobileConfig?.title\">{{ mobileConfig.title }}</h1>\n <button\n fd-dialog-close-button\n [mobile]=\"true\"\n *ngIf=\"mobileConfig?.hasCloseButton\"\n (click)=\"handleDismiss()\"\n ></button>\n <ng-template fdkTemplate=\"subheader\">\n <div fd-bar-middle>\n <fd-bar-element class=\"custom-multi-input-mobile-control-element\">\n <ng-container
|
|
101
|
+
MultiInputMobileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: MultiInputMobileComponent, selector: "fd-multi-input-mobile", viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <h1 fd-title *ngIf=\"mobileConfig?.title\">{{ mobileConfig.title }}</h1>\n <button\n fd-dialog-close-button\n [mobile]=\"true\"\n *ngIf=\"mobileConfig?.hasCloseButton\"\n (click)=\"handleDismiss()\"\n ></button>\n <ng-template fdkTemplate=\"subheader\">\n <div fd-bar-middle>\n <fd-bar-element class=\"custom-multi-input-mobile-control-element\">\n <ng-container\n *ngTemplateOutlet=\"\n childContent?.controlTemplate || null;\n context: { displayAddonButton: false }\n \"\n ></ng-container>\n </fd-bar-element>\n <fd-bar-element class=\"custom-multi-input-select-all-bar-element\">\n <button\n fd-button\n glyph=\"multiselect-all\"\n [fdType]=\"allItemsSelected ? 'emphasized' : 'transparent'\"\n (click)=\"selectAll(allItemsSelected)\"\n ></button>\n </fd-bar-element>\n </div>\n </ng-template>\n </fd-dialog-header>\n\n <fd-dialog-body>\n <ng-container *ngTemplateOutlet=\"childContent?.listTemplate || null\"></ng-container>\n </fd-dialog-body>\n\n <fd-dialog-footer>\n <fd-button-bar\n *ngIf=\"mobileConfig?.approveButtonText\"\n fdType=\"emphasized\"\n [label]=\"mobileConfig.approveButtonText!\"\n (click)=\"handleApprove()\"\n >\n </fd-button-bar>\n <fd-button-bar\n *ngIf=\"mobileConfig?.cancelButtonText\"\n [label]=\"mobileConfig.cancelButtonText!\"\n (click)=\"handleDismiss()\"\n >\n </fd-button-bar>\n </fd-dialog-footer>\n </fd-dialog>\n</ng-template>\n", styles: [".custom-multi-input-select-all-bar-element{min-width:2.25rem}.custom-multi-input-mobile-control-element{width:calc(100% - 2.25rem)}.custom-multi-input-mobile-control-element .fd-multi-input-input-group-custom{width:100%}\n"], dependencies: [{ kind: "directive", type: i2.BarMiddleDirective, selector: "[fd-bar-middle]" }, { kind: "directive", type: i2.BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth", "isTitle"] }, { kind: "component", type: i2.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "component", type: i1.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i1.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i1.DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: i1.DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "component", type: i1.DialogCloseButtonComponent, selector: "[fd-dialog-close-button]", inputs: ["mobile", "title"] }, { kind: "component", type: i3.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: i2$1.TemplateDirective, selector: "[fdkTemplate], [fdTemplate]", inputs: ["fdkTemplate"] }, { kind: "component", type: i5.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
102
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiInputMobileComponent, decorators: [{
|
|
103
103
|
type: Component,
|
|
104
|
-
args: [{ selector: 'fd-multi-input-mobile', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <h1 fd-title *ngIf=\"mobileConfig?.title\">{{ mobileConfig.title }}</h1>\n <button\n fd-dialog-close-button\n [mobile]=\"true\"\n *ngIf=\"mobileConfig?.hasCloseButton\"\n (click)=\"handleDismiss()\"\n ></button>\n <ng-template fdkTemplate=\"subheader\">\n <div fd-bar-middle>\n <fd-bar-element class=\"custom-multi-input-mobile-control-element\">\n <ng-container
|
|
104
|
+
args: [{ selector: 'fd-multi-input-mobile', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <h1 fd-title *ngIf=\"mobileConfig?.title\">{{ mobileConfig.title }}</h1>\n <button\n fd-dialog-close-button\n [mobile]=\"true\"\n *ngIf=\"mobileConfig?.hasCloseButton\"\n (click)=\"handleDismiss()\"\n ></button>\n <ng-template fdkTemplate=\"subheader\">\n <div fd-bar-middle>\n <fd-bar-element class=\"custom-multi-input-mobile-control-element\">\n <ng-container\n *ngTemplateOutlet=\"\n childContent?.controlTemplate || null;\n context: { displayAddonButton: false }\n \"\n ></ng-container>\n </fd-bar-element>\n <fd-bar-element class=\"custom-multi-input-select-all-bar-element\">\n <button\n fd-button\n glyph=\"multiselect-all\"\n [fdType]=\"allItemsSelected ? 'emphasized' : 'transparent'\"\n (click)=\"selectAll(allItemsSelected)\"\n ></button>\n </fd-bar-element>\n </div>\n </ng-template>\n </fd-dialog-header>\n\n <fd-dialog-body>\n <ng-container *ngTemplateOutlet=\"childContent?.listTemplate || null\"></ng-container>\n </fd-dialog-body>\n\n <fd-dialog-footer>\n <fd-button-bar\n *ngIf=\"mobileConfig?.approveButtonText\"\n fdType=\"emphasized\"\n [label]=\"mobileConfig.approveButtonText!\"\n (click)=\"handleApprove()\"\n >\n </fd-button-bar>\n <fd-button-bar\n *ngIf=\"mobileConfig?.cancelButtonText\"\n [label]=\"mobileConfig.cancelButtonText!\"\n (click)=\"handleDismiss()\"\n >\n </fd-button-bar>\n </fd-dialog-footer>\n </fd-dialog>\n</ng-template>\n", styles: [".custom-multi-input-select-all-bar-element{min-width:2.25rem}.custom-multi-input-mobile-control-element{width:calc(100% - 2.25rem)}.custom-multi-input-mobile-control-element .fd-multi-input-input-group-custom{width:100%}\n"] }]
|
|
105
105
|
}], ctorParameters: function () {
|
|
106
106
|
return [{ type: i0.ElementRef }, { type: i1.DialogService }, { type: undefined, decorators: [{
|
|
107
107
|
type: Inject,
|
|
@@ -131,6 +131,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
131
131
|
}]
|
|
132
132
|
}] });
|
|
133
133
|
|
|
134
|
+
function isOptionItem(candidate) {
|
|
135
|
+
return isOptionItemBase(candidate) && 'item' in candidate;
|
|
136
|
+
}
|
|
137
|
+
function isOptionItemBase(candidate) {
|
|
138
|
+
return typeof candidate === 'object' && candidate !== null && 'value' in candidate && 'label' in candidate;
|
|
139
|
+
}
|
|
134
140
|
/**
|
|
135
141
|
* Input field with multiple selection enabled. Should be used when a user can select between a
|
|
136
142
|
* limited number of pre-defined options with a filter-enabled context.
|
|
@@ -164,6 +170,13 @@ class MultiInputComponent {
|
|
|
164
170
|
}
|
|
165
171
|
return this.elementRef.nativeElement.getBoundingClientRect().width;
|
|
166
172
|
}
|
|
173
|
+
/** typeahead matcher function */
|
|
174
|
+
get typeAheadMatcher() {
|
|
175
|
+
if (this.includes) {
|
|
176
|
+
return (item, searchTerm) => item.includes(searchTerm);
|
|
177
|
+
}
|
|
178
|
+
return (item, searchTerm) => item.startsWith(searchTerm);
|
|
179
|
+
}
|
|
167
180
|
/** @hidden */
|
|
168
181
|
constructor(_contentDensityObserver, elementRef, _changeDetRef, _dynamicComponentService, _injector, _viewContainerRef, _language, _rtlService, _focusTrapService) {
|
|
169
182
|
this._contentDensityObserver = _contentDensityObserver;
|
|
@@ -254,7 +267,7 @@ class MultiInputComponent {
|
|
|
254
267
|
/** Multi Input Mobile Configuration, it's applied only, when mobile is enabled */
|
|
255
268
|
this.mobileConfig = { hasCloseButton: true, approveButtonText: 'Select' };
|
|
256
269
|
/**
|
|
257
|
-
* Whether
|
|
270
|
+
* Whether to return results where the input matches the entire string. By default, only results that start
|
|
258
271
|
* with the input search term will be returned.
|
|
259
272
|
*/
|
|
260
273
|
this.includes = false;
|
|
@@ -291,10 +304,32 @@ class MultiInputComponent {
|
|
|
291
304
|
/** @hidden */
|
|
292
305
|
this._translationResolver = new TranslationResolver();
|
|
293
306
|
/** @hidden */
|
|
307
|
+
this._trackBy = (index, optionItem) => this.valueFn(optionItem === null || optionItem === void 0 ? void 0 : optionItem.item);
|
|
308
|
+
/** @hidden */
|
|
294
309
|
this.onChange = () => { };
|
|
295
310
|
/** @hidden */
|
|
296
311
|
this.onTouched = () => { };
|
|
297
312
|
}
|
|
313
|
+
/** @hidden CssClassBuilder interface implementation
|
|
314
|
+
* function must return single string
|
|
315
|
+
* function is responsible for order which css classes are applied
|
|
316
|
+
*/
|
|
317
|
+
buildComponentCssClass() {
|
|
318
|
+
// TODO: this icon flip may be addressed in styles in the future
|
|
319
|
+
if (this.glyph === 'value-help' && this._dir === 'rtl') {
|
|
320
|
+
const icon = this.elementRef.nativeElement.querySelector('.sap-icon--value-help');
|
|
321
|
+
if (icon) {
|
|
322
|
+
icon.style.transform = 'scaleX(-1)';
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return ['fd-multi-input', 'fd-multi-input-custom', this.class];
|
|
326
|
+
}
|
|
327
|
+
/** @hidden */
|
|
328
|
+
_focusOut(event) {
|
|
329
|
+
if (!this.elementRef.nativeElement.contains(event.relatedTarget)) {
|
|
330
|
+
this.onTouched();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
298
333
|
/** @hidden */
|
|
299
334
|
ngOnInit() {
|
|
300
335
|
var _a;
|
|
@@ -344,20 +379,6 @@ class MultiInputComponent {
|
|
|
344
379
|
ngOnDestroy() {
|
|
345
380
|
this._subscriptions.unsubscribe();
|
|
346
381
|
}
|
|
347
|
-
/** @hidden CssClassBuilder interface implementation
|
|
348
|
-
* function must return single string
|
|
349
|
-
* function is responsible for order which css classes are applied
|
|
350
|
-
*/
|
|
351
|
-
buildComponentCssClass() {
|
|
352
|
-
// TODO: this icon flip may be addressed in styles in the future
|
|
353
|
-
if (this.glyph === 'value-help' && this._dir === 'rtl') {
|
|
354
|
-
const icon = this.elementRef.nativeElement.querySelector('.sap-icon--value-help');
|
|
355
|
-
if (icon) {
|
|
356
|
-
icon.style.transform = 'scaleX(-1)';
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
return ['fd-multi-input', 'fd-multi-input-custom', this.class];
|
|
360
|
-
}
|
|
361
382
|
/** @hidden */
|
|
362
383
|
registerOnChange(fn) {
|
|
363
384
|
this.onChange = fn;
|
|
@@ -609,7 +630,7 @@ class MultiInputComponent {
|
|
|
609
630
|
if (item) {
|
|
610
631
|
const displayedValue = this.displayFn(item);
|
|
611
632
|
const term = typeof displayedValue === 'string' ? displayedValue.toLocaleLowerCase() : '';
|
|
612
|
-
return this.
|
|
633
|
+
return this.typeAheadMatcher(term, searchLower);
|
|
613
634
|
}
|
|
614
635
|
});
|
|
615
636
|
}
|
|
@@ -619,7 +640,12 @@ class MultiInputComponent {
|
|
|
619
640
|
}
|
|
620
641
|
/** @hidden */
|
|
621
642
|
_defaultDisplay(str) {
|
|
622
|
-
|
|
643
|
+
if (typeof str === 'string') {
|
|
644
|
+
return str;
|
|
645
|
+
}
|
|
646
|
+
if (isOptionItemBase(str)) {
|
|
647
|
+
return str.label;
|
|
648
|
+
}
|
|
623
649
|
}
|
|
624
650
|
/** @hidden */
|
|
625
651
|
_defaultParse(str) {
|
|
@@ -666,7 +692,10 @@ class MultiInputComponent {
|
|
|
666
692
|
}
|
|
667
693
|
/** @hidden */
|
|
668
694
|
_getOptionItem(item) {
|
|
669
|
-
|
|
695
|
+
if (isOptionItem(item)) {
|
|
696
|
+
return item;
|
|
697
|
+
}
|
|
698
|
+
const { label, value } = this._getValueAndLabelOfItem(item);
|
|
670
699
|
return {
|
|
671
700
|
item,
|
|
672
701
|
label,
|
|
@@ -675,17 +704,26 @@ class MultiInputComponent {
|
|
|
675
704
|
};
|
|
676
705
|
}
|
|
677
706
|
/** @hidden */
|
|
678
|
-
|
|
679
|
-
var _a, _b
|
|
680
|
-
|
|
681
|
-
|
|
707
|
+
_getValueAndLabelOfItem(item) {
|
|
708
|
+
var _a, _b;
|
|
709
|
+
const defaultDisplay = typeof item === 'object' && item !== null ? item[Object.keys(item)[0]] : item;
|
|
710
|
+
let value = (_a = this.valueFn(item)) !== null && _a !== void 0 ? _a : defaultDisplay;
|
|
711
|
+
let label = (_b = this.displayFn(item)) !== null && _b !== void 0 ? _b : defaultDisplay;
|
|
712
|
+
if (isOptionItemBase(item)) {
|
|
713
|
+
if (this.valueFn === this._defaultValueFn) {
|
|
714
|
+
value = item.value;
|
|
715
|
+
}
|
|
716
|
+
if (this.displayFn === this._defaultDisplay) {
|
|
717
|
+
label = item.label;
|
|
718
|
+
}
|
|
682
719
|
}
|
|
683
|
-
const defaultDisplay = typeof itemOrValue === 'object' ? itemOrValue[Object.keys(itemOrValue)[0]] : itemOrValue;
|
|
684
|
-
const value = (_c = this.valueFn(itemOrValue)) !== null && _c !== void 0 ? _c : defaultDisplay;
|
|
685
|
-
const label = (_d = this.displayFn(itemOrValue)) !== null && _d !== void 0 ? _d : defaultDisplay;
|
|
686
720
|
return { label, value };
|
|
687
721
|
}
|
|
688
722
|
/** @hidden */
|
|
723
|
+
_getOptionItemByValue(value, optionItems = []) {
|
|
724
|
+
return optionItems.find((c) => c.value === value);
|
|
725
|
+
}
|
|
726
|
+
/** @hidden */
|
|
689
727
|
_getViewModel() {
|
|
690
728
|
return combineLatest([
|
|
691
729
|
this._searchTermCtrl.valueChanges.pipe(startWith(this._searchTermCtrl.value)),
|
|
@@ -693,22 +731,16 @@ class MultiInputComponent {
|
|
|
693
731
|
this.optionItems$
|
|
694
732
|
]).pipe(map(([, , optionItems]) => {
|
|
695
733
|
var _a;
|
|
696
|
-
const selected = this.selected.map((
|
|
734
|
+
const selected = this.selected.map((v) => this._getOptionItemByValue(v, optionItems) || this._getOptionItem(v));
|
|
697
735
|
// not using "searchTerm" value from combineLatest as it will be wrong for late subscribers, if any
|
|
698
736
|
const searchTerm = (_a = this._searchTermCtrl.value) !== null && _a !== void 0 ? _a : '';
|
|
699
737
|
const filtered = this.filterFn(optionItems.map((c) => c.item), searchTerm);
|
|
700
738
|
const displayedOptions = (Array.isArray(filtered) ? filtered : []).map((item) => this._getOptionItem(item));
|
|
701
|
-
displayedOptions.forEach((c) => (c.isSelected = selected.findIndex((d) => d.value === c.value) > -1));
|
|
739
|
+
displayedOptions.forEach((c) => (c.isSelected = selected.findIndex((d) => (d === null || d === void 0 ? void 0 : d.value) === c.value) > -1));
|
|
702
740
|
return { selectedOptions: selected, displayedOptions };
|
|
703
741
|
}));
|
|
704
742
|
}
|
|
705
743
|
/** @hidden */
|
|
706
|
-
_focusOut(event) {
|
|
707
|
-
if (!this.elementRef.nativeElement.contains(event.relatedTarget)) {
|
|
708
|
-
this.onTouched();
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
/** @hidden */
|
|
712
744
|
_getAriaLabel() {
|
|
713
745
|
return __awaiter(this, void 0, void 0, function* () {
|
|
714
746
|
const lang = yield firstValueFrom(this._language);
|
|
@@ -726,7 +758,7 @@ MultiInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
726
758
|
MenuKeyboardService,
|
|
727
759
|
registerFormItemControl(MultiInputComponent),
|
|
728
760
|
contentDensityObserverProviders()
|
|
729
|
-
], 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 [ngTemplateOutlet]=\"control\" *ngIf=\"mobile\"></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 *ngTemplateOutlet=\"control\"></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>\n <fd-input-group\n class=\"fd-multi-input-input-group-custom\"\n [state]=\"state\"\n [buttonFocusable]=\"buttonFocusable\"\n [button]=\"displayAddonButton\"\n [disabled]=\"disabled\"\n [isExpanded]=\"open && !mobile && viewModel.displayedOptions.length > 0\"\n [isControl]=\"true\"\n [glyph]=\"displayAddonButton ? 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: valueFn\"\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 [inputText]=\"_searchTermCtrl.value || ''\"\n [options]=\"dropdownValues\"\n [enable]=\"autoComplete && !mobile\"\n [placeholder]=\"placeholder\"\n [formControl]=\"_searchTermCtrl\"\n [attr.aria-required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"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.maxHeight]=\"!mobile ? maxHeight : 'auto'\"\n [byline]=\"byline\"\n (focusEscapeList)=\"handleListFocusEscape($event)\"\n [style.minWidth]=\"'100%'\"\n >\n <li\n *ngFor=\"let option of viewModel.displayedOptions; index as idx; trackBy: valueFn\"\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"], 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", "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 });
|
|
761
|
+
], 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 [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"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"], 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 });
|
|
730
762
|
__decorate([
|
|
731
763
|
applyCssClass,
|
|
732
764
|
__metadata("design:type", Function),
|
|
@@ -744,7 +776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
744
776
|
MenuKeyboardService,
|
|
745
777
|
registerFormItemControl(MultiInputComponent),
|
|
746
778
|
contentDensityObserverProviders()
|
|
747
|
-
], 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
|
|
779
|
+
], 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.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 [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"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"] }]
|
|
748
780
|
}], ctorParameters: function () {
|
|
749
781
|
return [{ type: i1$1.ContentDensityObserver }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2$1.DynamicComponentService }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: i12.Observable, decorators: [{
|
|
750
782
|
type: Inject,
|