@fundamental-ngx/core 0.46.2-rc.2 → 0.46.2-rc.4
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/calendar/calendar-directives.d.ts +5 -9
- package/calendar/calendar-header/calendar-header.component.d.ts +7 -25
- package/calendar/calendar-views/calendar-aggregated-year-view/calendar-aggregated-year-view.component.d.ts +1 -20
- package/calendar/calendar-views/calendar-day-view/calendar-day-view.component.d.ts +6 -44
- package/calendar/calendar-views/calendar-month-view/calendar-month-view.component.d.ts +2 -21
- package/calendar/calendar-views/calendar-year-view/calendar-year-view.component.d.ts +3 -22
- package/calendar/calendar.component.d.ts +9 -9
- package/calendar/i18n/calendar-i18n-labels.d.ts +20 -22
- package/calendar/patch-deprecated-i18n-labels.d.ts +6 -0
- package/esm2022/calendar/calendar-directives.mjs +10 -18
- package/esm2022/calendar/calendar-header/calendar-header.component.mjs +30 -60
- package/esm2022/calendar/calendar-views/calendar-aggregated-year-view/calendar-aggregated-year-view.component.mjs +10 -35
- package/esm2022/calendar/calendar-views/calendar-day-view/calendar-day-view.component.mjs +13 -65
- package/esm2022/calendar/calendar-views/calendar-month-view/calendar-month-view.component.mjs +11 -36
- package/esm2022/calendar/calendar-views/calendar-year-view/calendar-year-view.component.mjs +12 -37
- package/esm2022/calendar/calendar.component.mjs +20 -10
- package/esm2022/calendar/i18n/calendar-i18n-labels.mjs +22 -28
- package/esm2022/calendar/patch-deprecated-i18n-labels.mjs +21 -0
- package/esm2022/multi-input/multi-input.component.mjs +13 -4
- package/fesm2022/fundamental-ngx-core-calendar.mjs +150 -288
- package/fesm2022/fundamental-ngx-core-calendar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +12 -3
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fundamental-ngx-core-v0.46.2-rc.4.tgz +0 -0
- package/multi-input/multi-input.component.d.ts +2 -0
- package/package.json +3 -3
- package/schematics/add-dependencies/index.js +4 -4
- package/fundamental-ngx-core-v0.46.2-rc.2.tgz +0 -0
|
@@ -344,6 +344,8 @@ class MultiInputComponent {
|
|
|
344
344
|
/** @hidden */
|
|
345
345
|
this.optionItems$ = new BehaviorSubject([]);
|
|
346
346
|
/** @hidden */
|
|
347
|
+
this._onlySelected$ = new BehaviorSubject(false);
|
|
348
|
+
/** @hidden */
|
|
347
349
|
this._searchTermCtrl = new FormControl('');
|
|
348
350
|
/** @hidden */
|
|
349
351
|
this._selectionModel = new PairSelectionModel();
|
|
@@ -470,6 +472,7 @@ class MultiInputComponent {
|
|
|
470
472
|
if (!this.open) {
|
|
471
473
|
this._resetSearchTerm();
|
|
472
474
|
this.enableParentFocusTrap();
|
|
475
|
+
this._onlySelected$.next(false);
|
|
473
476
|
}
|
|
474
477
|
else {
|
|
475
478
|
this.disableParentFocusTrap();
|
|
@@ -623,6 +626,7 @@ class MultiInputComponent {
|
|
|
623
626
|
}
|
|
624
627
|
/** @hidden */
|
|
625
628
|
_moreClicked() {
|
|
629
|
+
this._onlySelected$.next(true);
|
|
626
630
|
this.openChangeHandle(true);
|
|
627
631
|
}
|
|
628
632
|
/** @hidden */
|
|
@@ -776,13 +780,18 @@ class MultiInputComponent {
|
|
|
776
780
|
return combineLatest([
|
|
777
781
|
this._searchTermCtrl.valueChanges.pipe(startWith(this._searchTermCtrl.value)),
|
|
778
782
|
this._selectionModel.selectionChanged.pipe(startWith(null)),
|
|
783
|
+
this._onlySelected$,
|
|
779
784
|
this.optionItems$
|
|
780
785
|
]).pipe(map(() => {
|
|
781
786
|
// not using "searchTerm" value from combineLatest as it will be wrong for late subscribers, if any
|
|
782
787
|
const searchTerm = this._searchTermCtrl.value ?? '';
|
|
783
788
|
const filtered = this.filterFn(this.dropdownValues, searchTerm);
|
|
784
|
-
const
|
|
789
|
+
const onlySelected = this._onlySelected$.value;
|
|
790
|
+
let displayedOptions = (Array.isArray(filtered) ? filtered : []).map((item) => this._getOptionItem(item));
|
|
785
791
|
displayedOptions.forEach((c) => (c.isSelected = this._selectionModel.isSelected(c.id)));
|
|
792
|
+
if (onlySelected) {
|
|
793
|
+
displayedOptions = displayedOptions.filter((item) => item.isSelected);
|
|
794
|
+
}
|
|
786
795
|
return { selectedOptions: this._selectionModel.selected, displayedOptions };
|
|
787
796
|
}));
|
|
788
797
|
}
|
|
@@ -796,7 +805,7 @@ class MultiInputComponent {
|
|
|
796
805
|
MenuKeyboardService,
|
|
797
806
|
registerFormItemControl(MultiInputComponent),
|
|
798
807
|
contentDensityObserverProviders()
|
|
799
|
-
], 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 role=\"button\" 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__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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i4$1.InputGroupComponent, selector: "fd-input-group", inputs: ["placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "directive", type: i4$1.InputGroupInputDirective, selector: "[fdInputGroupInput], [fd-input-group-input]", inputs: ["class"] }, { kind: "ngmodule", type: TokenModule }, { kind: "component", type: i5$1.TokenComponent, selector: "fd-token", inputs: ["disabled", "selected", "readOnly"], outputs: ["onCloseClick", "onRemove", "onTokenClick", "onTokenKeydown", "elementFocused"] }, { kind: "component", type: i5$1.TokenizerComponent, selector: "fd-tokenizer", inputs: ["class", "disableKeyboardDeletion", "compactCollapse", "tokenizerFocusable", "inputValue", "glyph", "moreTerm", "open"], outputs: ["moreClickedEvent"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FormControlComponent, selector: "[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "directive", type: AutoCompleteDirective, selector: "[fdkAutoComplete]", inputs: ["options", "inputText", "enable", "matcher", "displayFn"], outputs: ["onComplete"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ListModule }, { 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", "noData", "action", "interactive", "growing", "counter", "unread", "byline"], outputs: ["keyDown"] }, { kind: "directive", type: i6.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: CheckboxComponent, selector: "fd-checkbox", inputs: ["wrapLabel", "valignLabel", "ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "displayOnly", "values", "standalone"], outputs: ["focusChange"] }, { kind: "component", type: LinkComponent, selector: "[fdLink], [fd-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SearchHighlightPipe, name: "highlight" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
808
|
+
], 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=\"\n showAllButton &&\n (_onlySelected$ | async) !== true &&\n viewModel.displayedOptions.length < dropdownValues.length\n \"\n fd-list-item\n class=\"fd-multi-input-show-all\"\n (keyDown)=\"_showAllKeyDown($event)\"\n (click)=\"_showAllClicked($event)\"\n >\n <a fd-link role=\"button\" 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__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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i4$1.InputGroupComponent, selector: "fd-input-group", inputs: ["placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "directive", type: i4$1.InputGroupInputDirective, selector: "[fdInputGroupInput], [fd-input-group-input]", inputs: ["class"] }, { kind: "ngmodule", type: TokenModule }, { kind: "component", type: i5$1.TokenComponent, selector: "fd-token", inputs: ["disabled", "selected", "readOnly"], outputs: ["onCloseClick", "onRemove", "onTokenClick", "onTokenKeydown", "elementFocused"] }, { kind: "component", type: i5$1.TokenizerComponent, selector: "fd-tokenizer", inputs: ["class", "disableKeyboardDeletion", "compactCollapse", "tokenizerFocusable", "inputValue", "glyph", "moreTerm", "open"], outputs: ["moreClickedEvent"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FormControlComponent, selector: "[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "directive", type: AutoCompleteDirective, selector: "[fdkAutoComplete]", inputs: ["options", "inputText", "enable", "matcher", "displayFn"], outputs: ["onComplete"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ListModule }, { 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", "noData", "action", "interactive", "growing", "counter", "unread", "byline"], outputs: ["keyDown"] }, { kind: "directive", type: i6.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: CheckboxComponent, selector: "fd-checkbox", inputs: ["wrapLabel", "valignLabel", "ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "displayOnly", "values", "standalone"], outputs: ["focusChange"] }, { kind: "component", type: LinkComponent, selector: "[fdLink], [fd-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SearchHighlightPipe, name: "highlight" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
800
809
|
}
|
|
801
810
|
__decorate([
|
|
802
811
|
applyCssClass,
|
|
@@ -834,7 +843,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
834
843
|
AsyncPipe,
|
|
835
844
|
SearchHighlightPipe,
|
|
836
845
|
FdTranslatePipe
|
|
837
|
-
], 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
|
|
846
|
+
], 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=\"\n showAllButton &&\n (_onlySelected$ | async) !== true &&\n viewModel.displayedOptions.length < dropdownValues.length\n \"\n fd-list-item\n class=\"fd-multi-input-show-all\"\n (keyDown)=\"_showAllKeyDown($event)\"\n (click)=\"_showAllClicked($event)\"\n >\n <a fd-link role=\"button\" 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__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"] }]
|
|
838
847
|
}], ctorParameters: function () { return [{ type: i1$1.ContentDensityObserver }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2.DynamicComponentService }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: i2.RtlService, decorators: [{
|
|
839
848
|
type: Optional
|
|
840
849
|
}] }, { type: i2.FocusTrapService, decorators: [{
|