ngx-bootstrap-ci
Version:
Native Angular Bootstrap Components
1,661 lines (1,651 loc) • 194 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('ngx-bootstrap/utils'), require('@angular/forms'), require('rxjs'), require('ngx-bootstrap/component-loader'), require('ngx-bootstrap/positioning'), require('rxjs/operators'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-bootstrap/typeahead', ['exports', '@angular/core', 'ngx-bootstrap/utils', '@angular/forms', 'rxjs', 'ngx-bootstrap/component-loader', 'ngx-bootstrap/positioning', 'rxjs/operators', '@angular/common'], factory) :
(factory((global['ngx-bootstrap'] = global['ngx-bootstrap'] || {}, global['ngx-bootstrap'].typeahead = {}),global.ng.core,global.utils,global.ng.forms,global.rxjs,global.componentLoader,global.positioning,global.rxjs.operators,global.ng.common));
}(this, (function (exports,core,utils,forms,rxjs,componentLoader,positioning,operators,common) { 'use strict';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/* tslint:disable */
var /** @type {?} */ latinMap = {
'Á': 'A',
'Ă': 'A',
'Ắ': 'A',
'Ặ': 'A',
'Ằ': 'A',
'Ẳ': 'A',
'Ẵ': 'A',
'Ǎ': 'A',
'Â': 'A',
'Ấ': 'A',
'Ậ': 'A',
'Ầ': 'A',
'Ẩ': 'A',
'Ẫ': 'A',
'Ä': 'A',
'Ǟ': 'A',
'Ȧ': 'A',
'Ǡ': 'A',
'Ạ': 'A',
'Ȁ': 'A',
'À': 'A',
'Ả': 'A',
'Ȃ': 'A',
'Ā': 'A',
'Ą': 'A',
'Å': 'A',
'Ǻ': 'A',
'Ḁ': 'A',
'Ⱥ': 'A',
'Ã': 'A',
'Ꜳ': 'AA',
'Æ': 'AE',
'Ǽ': 'AE',
'Ǣ': 'AE',
'Ꜵ': 'AO',
'Ꜷ': 'AU',
'Ꜹ': 'AV',
'Ꜻ': 'AV',
'Ꜽ': 'AY',
'Ḃ': 'B',
'Ḅ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': 'w',
'ẘ': 'w',
'ẍ': 'x',
'ẋ': 'x',
'ᶍ': 'x',
'ý': 'y',
'ŷ': 'y',
'ÿ': 'y',
'ẏ': 'y',
'ỵ': 'y',
'ỳ': 'y',
'ƴ': 'y',
'ỷ': 'y',
'ỿ': 'y',
'ȳ': 'y',
'ẙ': 'y',
'ɏ': 'y',
'ỹ': 'y',
'ź': 'z',
'ž': 'z',
'ẑ': 'z',
'ʑ': 'z',
'ⱬ': 'z',
'ż': 'z',
'ẓ': 'z',
'ȥ': 'z',
'ẕ': 'z',
'ᵶ': 'z',
'ᶎ': 'z',
'ʐ': 'z',
'ƶ': 'z',
'ɀ': 'z',
'ff': 'ff',
'ffi': 'ffi',
'ffl': 'ffl',
'fi': 'fi',
'fl': 'fl',
'ij': 'ij',
'œ': 'oe',
'st': 'st',
'ₐ': 'a',
'ₑ': 'e',
'ᵢ': 'i',
'ⱼ': 'j',
'ₒ': 'o',
'ᵣ': 'r',
'ᵤ': 'u',
'ᵥ': 'v',
'ₓ': 'x'
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
var TypeaheadOptions = (function () {
function TypeaheadOptions(options) {
Object.assign(this, options);
}
return TypeaheadOptions;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
var TypeaheadMatch = (function () {
// tslint:disable-next-line:no-any
function TypeaheadMatch(item, value, header) {
if (value === void 0) {
value = item;
}
if (header === void 0) {
header = false;
}
this.item = item;
this.value = value;
this.header = header;
}
/**
* @return {?}
*/
TypeaheadMatch.prototype.isHeader = /**
* @return {?}
*/
function () {
return this.header;
};
/**
* @return {?}
*/
TypeaheadMatch.prototype.toString = /**
* @return {?}
*/
function () {
return this.value;
};
return TypeaheadMatch;
}());
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m)
return m.call(o);
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @param {?} str
* @return {?}
*/
function latinize(str) {
if (!str) {
return '';
}
return str.replace(/[^A-Za-z0-9\[\] ]/g, function (a) {
return latinMap[a] || a;
});
}
/**
* @param {?} queryToEscape
* @return {?}
*/
function escapeRegexp(queryToEscape) {
// Regex: capture the whole query string and replace it with the string
// that will be used to match the results, for example if the capture is
// 'a' the result will be \a
return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
}
/**
* @param {?} str
* @param {?=} wordRegexDelimiters
* @param {?=} phraseRegexDelimiters
* @return {?}
*/
function tokenize(str, wordRegexDelimiters, phraseRegexDelimiters) {
if (wordRegexDelimiters === void 0) {
wordRegexDelimiters = ' ';
}
if (phraseRegexDelimiters === void 0) {
phraseRegexDelimiters = '';
}
/* tslint:enable */
var /** @type {?} */ regexStr = "(?:[" + phraseRegexDelimiters + "])([^" + phraseRegexDelimiters + "]+)" +
("(?:[" + phraseRegexDelimiters + "])|([^" + wordRegexDelimiters + "]+)");
var /** @type {?} */ preTokenized = str.split(new RegExp(regexStr, 'g'));
var /** @type {?} */ result = [];
var /** @type {?} */ preTokenizedLength = preTokenized.length;
var /** @type {?} */ token;
var /** @type {?} */ replacePhraseDelimiters = new RegExp("[" + phraseRegexDelimiters + "]+", 'g');
for (var /** @type {?} */ i = 0; i < preTokenizedLength; i += 1) {
token = preTokenized[i];
if (token && token.length && token !== wordRegexDelimiters) {
result.push(token.replace(replacePhraseDelimiters, ''));
}
}
return result;
}
/**
* @param {?} object
* @param {?} option
* @return {?}
*/
function getValueFromObject(object, option) {
if (!option || typeof object !== 'object') {
return object.toString();
}
if (option.endsWith('()')) {
var /** @type {?} */ functionName = option.slice(0, option.length - 2);
return object[functionName]().toString();
}
var /** @type {?} */ properties = option
.replace(/\[(\w+)\]/g, '.$1')
.replace(/^\./, '');
var /** @type {?} */ propertiesArray = properties.split('.');
try {
for (var propertiesArray_1 = __values(propertiesArray), propertiesArray_1_1 = propertiesArray_1.next(); !propertiesArray_1_1.done; propertiesArray_1_1 = propertiesArray_1.next()) {
var property = propertiesArray_1_1.value;
if (property in object) {
// tslint:disable-next-line
object = object[property];
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (propertiesArray_1_1 && !propertiesArray_1_1.done && (_a = propertiesArray_1.return))
_a.call(propertiesArray_1);
}
finally {
if (e_1)
throw e_1.error;
}
}
if (!object) {
return '';
}
return object.toString();
var e_1, _a;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
var TypeaheadContainerComponent = (function () {
function TypeaheadContainerComponent(element, renderer) {
this.renderer = renderer;
this.isFocused = false;
this._matches = [];
this.isScrolledIntoView = function (elem) {
var /** @type {?} */ containerViewTop = this.ulElement.nativeElement.scrollTop;
var /** @type {?} */ containerViewBottom = containerViewTop + Number(this.ulElement.nativeElement.offsetHeight);
var /** @type {?} */ elemTop = elem.offsetTop;
var /** @type {?} */ elemBottom = elemTop + elem.offsetHeight;
return ((elemBottom <= containerViewBottom) && (elemTop >= containerViewTop));
};
this.element = element;
}
Object.defineProperty(TypeaheadContainerComponent.prototype, "isBs4", {
get: /**
* @return {?}
*/ function () {
return !utils.isBs3();
},
enumerable: true,
configurable: true
});
Object.defineProperty(TypeaheadContainerComponent.prototype, "active", {
get: /**
* @return {?}
*/ function () {
return this._active;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TypeaheadContainerComponent.prototype, "matches", {
get: /**
* @return {?}
*/ function () {
return this._matches;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
var _this = this;
this._matches = value;
this.needScrollbar = this.typeaheadScrollable && this.typeaheadOptionsInScrollableView < this.matches.length;
if (this.typeaheadScrollable) {
setTimeout(function () {
_this.setScrollableMode();
});
}
if (this._matches.length > 0) {
this._active = this._matches[0];
if (this._active.isHeader()) {
this.nextActiveMatch();
}
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(TypeaheadContainerComponent.prototype, "optionsListTemplate", {
// tslint:disable-next-line:no-any
get: /**
* @return {?}
*/ function () {
return this.parent ? this.parent.optionsListTemplate : undefined;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TypeaheadContainerComponent.prototype, "typeaheadScrollable", {
get: /**
* @return {?}
*/ function () {
return this.parent ? this.parent.typeaheadScrollable : false;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TypeaheadContainerComponent.prototype, "typeaheadOptionsInScrollableView", {
get: /**
* @return {?}
*/ function () {
return this.parent ? this.parent.typeaheadOptionsInScrollableView : 5;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TypeaheadContainerComponent.prototype, "itemTemplate", {
// tslint:disable-next-line:no-any
get: /**
* @return {?}
*/ function () {
return this.parent ? this.parent.typeaheadItemTemplate : undefined;
},
enumerable: true,
configurable: true
});
/**
* @param {?=} isActiveItemChanged
* @return {?}
*/
TypeaheadContainerComponent.prototype.selectActiveMatch = /**
* @param {?=} isActiveItemChanged
* @return {?}
*/
function (isActiveItemChanged) {
if (this._active && this.parent.typeaheadSelectFirstItem) {
this.selectMatch(this._active);
}
if (!this.parent.typeaheadSelectFirstItem && isActiveItemChanged) {
this.selectMatch(this._active);
}
};
/**
* @return {?}
*/
TypeaheadContainerComponent.prototype.prevActiveMatch = /**
* @return {?}
*/
function () {
var /** @type {?} */ index = this.matches.indexOf(this._active);
this._active = this.matches[index - 1 < 0 ? this.matches.length - 1 : index - 1];
if (this._active.isHeader()) {
this.prevActiveMatch();
}
if (this.typeaheadScrollable) {
this.scrollPrevious(index);
}
};
/**
* @return {?}
*/
TypeaheadContainerComponent.prototype.nextActiveMatch = /**
* @return {?}
*/
function () {
var /** @type {?} */ index = this.matches.indexOf(this._active);
this._active = this.matches[index + 1 > this.matches.length - 1 ? 0 : index + 1];
if (this._active.isHeader()) {
this.nextActiveMatch();
}
if (this.typeaheadScrollable) {
this.scrollNext(index);
}
};
/**
* @param {?} value
* @return {?}
*/
TypeaheadContainerComponent.prototype.selectActive = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.isFocused = true;
this._active = value;
};
/**
* @param {?} match
* @param {?} query
* @return {?}
*/
TypeaheadContainerComponent.prototype.highlight = /**
* @param {?} match
* @param {?} query
* @return {?}
*/
function (match, query) {
var /** @type {?} */ itemStr = match.value;
var /** @type {?} */ itemStrHelper = (this.parent && this.parent.typeaheadLatinize
? latinize(itemStr)
: itemStr).toLowerCase();
var /** @type {?} */ startIdx;
var /** @type {?} */ tokenLen;
// Replaces the capture string with the same string inside of a "strong" tag
if (typeof query === 'object') {
var /** @type {?} */ queryLen = query.length;
for (var /** @type {?} */ i = 0; i < queryLen; i += 1) {
// query[i] is already latinized and lower case
startIdx = itemStrHelper.indexOf(query[i]);
tokenLen = query[i].length;
if (startIdx >= 0 && tokenLen > 0) {
itemStr =
itemStr.substring(0, startIdx) + "<strong>" + itemStr.substring(startIdx, startIdx + tokenLen) + "</strong>" +
("" + itemStr.substring(startIdx + tokenLen));
itemStrHelper =
itemStrHelper.substring(0, startIdx) + " " + ' '.repeat(tokenLen) + " " +
("" + itemStrHelper.substring(startIdx + tokenLen));
}
}
}
else if (query) {
// query is already latinized and lower case
startIdx = itemStrHelper.indexOf(query);
tokenLen = query.length;
if (startIdx >= 0 && tokenLen > 0) {
itemStr =
itemStr.substring(0, startIdx) + "<strong>" + itemStr.substring(startIdx, startIdx + tokenLen) + "</strong>" +
("" + itemStr.substring(startIdx + tokenLen));
}
}
return itemStr;
};
/**
* @return {?}
*/
TypeaheadContainerComponent.prototype.focusLost = /**
* @return {?}
*/
function () {
this.isFocused = false;
};
/**
* @param {?} value
* @return {?}
*/
TypeaheadContainerComponent.prototype.isActive = /**
* @param {?} value
* @return {?}
*/
function (value) {
return this._active === value;
};
/**
* @param {?} value
* @param {?=} e
* @return {?}
*/
TypeaheadContainerComponent.prototype.selectMatch = /**
* @param {?} value
* @param {?=} e
* @return {?}
*/
function (value, e) {
var _this = this;
if (e === void 0) {
e = void 0;
}
if (e) {
e.stopPropagation();
e.preventDefault();
}
this.parent.changeModel(value);
setTimeout(function () { return _this.parent.typeaheadOnSelect.emit(value); }, 0);
return false;
};
/**
* @return {?}
*/
TypeaheadContainerComponent.prototype.setScrollableMode = /**
* @return {?}
*/
function () {
if (!this.ulElement) {
this.ulElement = this.element;
}
if (this.liElements.first) {
var /** @type {?} */ ulStyles = utils.Utils.getStyles(this.ulElement.nativeElement);
var /** @type {?} */ liStyles = utils.Utils.getStyles(this.liElements.first.nativeElement);
var /** @type {?} */ ulPaddingBottom = parseFloat((ulStyles['padding-bottom'] ? ulStyles['padding-bottom'] : '')
.replace('px', ''));
var /** @type {?} */ ulPaddingTop = parseFloat((ulStyles['padding-top'] ? ulStyles['padding-top'] : '0')
.replace('px', ''));
var /** @type {?} */ optionHeight = parseFloat((liStyles.height ? liStyles.height : '0')
.replace('px', ''));
var /** @type {?} */ height = this.typeaheadOptionsInScrollableView * optionHeight;
this.guiHeight = height + ulPaddingTop + ulPaddingBottom + "px";
}
this.renderer.setStyle(this.element.nativeElement, 'visibility', 'visible');
};
/**
* @param {?} index
* @return {?}
*/
TypeaheadContainerComponent.prototype.scrollPrevious = /**
* @param {?} index
* @return {?}
*/
function (index) {
if (index === 0) {
this.scrollToBottom();
return;
}
if (this.liElements) {
var /** @type {?} */ liElement = this.liElements.toArray()[index - 1];
if (liElement && !this.isScrolledIntoView(liElement.nativeElement)) {
this.ulElement.nativeElement.scrollTop = liElement.nativeElement.offsetTop;
}
}
};
/**
* @param {?} index
* @return {?}
*/
TypeaheadContainerComponent.prototype.scrollNext = /**
* @param {?} index
* @return {?}
*/
function (index) {
if (index + 1 > this.matches.length - 1) {
this.scrollToTop();
return;
}
if (this.liElements) {
var /** @type {?} */ liElement = this.liElements.toArray()[index + 1];
if (liElement && !this.isScrolledIntoView(liElement.nativeElement)) {
this.ulElement.nativeElement.scrollTop =
liElement.nativeElement.offsetTop -
Number(this.ulElement.nativeElement.offsetHeight) +
Number(liElement.nativeElement.offsetHeight);
}
}
};
/**
* @return {?}
*/
TypeaheadContainerComponent.prototype.scrollToBottom = /**
* @return {?}
*/
function () {
this.ulElement.nativeElement.scrollTop = this.ulElement.nativeElement.scrollHeight;
};
/**
* @return {?}
*/
TypeaheadContainerComponent.prototype.scrollToTop = /**
* @return {?}
*/
function () {
this.ulElement.nativeElement.scrollTop = 0;
};
TypeaheadContainerComponent.decorators = [
{ type: core.Component, args: [{
selector: 'typeahead-container',
// tslint:disable-next-line
template: "<!-- inject options list template -->\n<ng-template [ngTemplateOutlet]=\"optionsListTemplate || (isBs4 ? bs4Template : bs3Template)\"\n [ngTemplateOutletContext]=\"{matches:matches, itemTemplate:itemTemplate, query:query}\"></ng-template>\n\n<!-- default options item template -->\n<ng-template #bsItemTemplate let-match=\"match\" let-query=\"query\"><span [innerHtml]=\"highlight(match, query)\"></span>\n</ng-template>\n\n<!-- Bootstrap 3 options list template -->\n<ng-template #bs3Template>\n <ul class=\"dropdown-menu\"\n #ulElement\n [style.overflow-y]=\"needScrollbar ? 'scroll': 'auto'\"\n [style.height]=\"needScrollbar ? guiHeight: 'auto'\">\n <ng-template ngFor let-match let-i=\"index\" [ngForOf]=\"matches\">\n <li #liElements *ngIf=\"match.isHeader()\" class=\"dropdown-header\">{{ match }}</li>\n <li #liElements *ngIf=\"!match.isHeader()\" [class.active]=\"isActive(match)\" (mouseenter)=\"selectActive(match)\">\n <a href=\"#\" (click)=\"selectMatch(match, $event)\" tabindex=\"-1\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate || bsItemTemplate\"\n [ngTemplateOutletContext]=\"{item:match.item, index:i, match:match, query:query}\"></ng-template>\n </a>\n </li>\n </ng-template>\n </ul>\n</ng-template>\n\n<!-- Bootstrap 4 options list template -->\n<ng-template #bs4Template>\n <ng-template ngFor let-match let-i=\"index\" [ngForOf]=\"matches\">\n <h6 *ngIf=\"match.isHeader()\" class=\"dropdown-header\">{{ match }}</h6>\n <ng-template [ngIf]=\"!match.isHeader()\">\n <button #liElements\n class=\"dropdown-item\"\n (click)=\"selectMatch(match, $event)\"\n (mouseenter)=\"selectActive(match)\"\n [class.active]=\"isActive(match)\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate || bsItemTemplate\"\n [ngTemplateOutletContext]=\"{item:match.item, index:i, match:match, query:query}\"></ng-template>\n </button>\n </ng-template>\n </ng-template>\n</ng-template>\n",
host: {
class: 'dropdown open',
'[class.dropdown-menu]': 'isBs4',
'[style.overflow-y]': "isBs4 && needScrollbar ? 'scroll': 'visible'",
'[style.height]': "isBs4 && needScrollbar ? guiHeight: 'auto'",
'[style.visibility]': "typeaheadScrollable ? 'hidden' : 'visible'",
'[class.dropup]': 'dropup',
style: 'position: absolute;display: block;'
},
styles: ["\n :host.dropdown {\n z-index: 1000;\n }\n "]
}] }
];
/** @nocollapse */
TypeaheadContainerComponent.ctorParameters = function () {
return [
{ type: core.ElementRef, },
{ type: core.Renderer2, },
];
};
TypeaheadContainerComponent.propDecorators = {
"ulElement": [{ type: core.ViewChild, args: ['ulElement',] },],
"liElements": [{ type: core.ViewChildren, args: ['liElements',] },],
"focusLost": [{ type: core.HostListener, args: ['mouseleave',] }, { type: core.HostListener, args: ['blur',] },],
};
return TypeaheadContainerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* Default values provider for typeahead
*/
var TypeaheadConfig = (function () {
function TypeaheadConfig() {
/**
* sets use adaptive position
*/
this.adaptivePosition = false;
/**
* used to hide results on blur
*/
this.hideResultsOnBlur = true;
/**
* used to choose the first item in typeahead container
*/
this.selectFirstItem = true;
/**
* used to choose set minimal no of characters that needs to
* be entered before typeahead kicks-in
*/
this.minLength = 1;
}
TypeaheadConfig.decorators = [
{ type: core.Injectable }
];
return TypeaheadConfig;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
var TypeaheadDirective = (function () {
function TypeaheadDirective(cis, config, changeDetection, element, ngControl, positionService, renderer, viewContainerRef) {
this.changeDetection = changeDetection;
this.element = element;
this.ngControl = ngControl;
this.positionService = positionService;
this.renderer = renderer;
/**
* minimal no of characters that needs to be entered before
* typeahead kicks-in. When set to 0, typeahead shows on focus with full
* list of options (limited as normal by typeaheadOptionsLimit)
*/
this.typeaheadMinLength = void 0;
/**
* should be used only in case of typeahead attribute is array.
* If true - loading of options will be async, otherwise - sync.
* true make sense if options array is large.
*/
this.typeaheadAsync = void 0;
/**
* match latin symbols.
* If true the word súper would match super and vice versa.
*/
this.typeaheadLatinize = true;
/**
* Can be use to search words by inserting a single white space between each characters
* for example 'C a l i f o r n i a' will match 'California'.
*/
this.typeaheadSingleWords = true;
/**
* should be used only in case typeaheadSingleWords attribute is true.
* Sets the word delimiter to break words. Defaults to space.
*/
this.typeaheadWordDelimiters = ' ';
/**
* should be used only in case typeaheadSingleWords attribute is true.
* Sets the word delimiter to match exact phrase.
* Defaults to simple and double quotes.
*/
this.typeaheadPhraseDelimiters = '\'"';
/**
* specifies if typeahead is scrollable
*/
this.typeaheadScrollable = false;
/**
* specifies number of options to show in scroll view
*/
this.typeaheadOptionsInScrollableView = 5;
/**
* fired when an options list was opened and the user clicked Tab
* If a value equal true, it will be chosen first or active item in the list
* If value equal false, it will be chosen an active item in the list or nothing
*/
this.typeaheadSelectFirstItem = true;
/**
* fired when 'busy' state of this component was changed,
* fired on async mode only, returns boolean
*/
this.typeaheadLoading = new core.EventEmitter();
/**
* fired on every key event and returns true
* in case of matches are not detected
*/
this.typeaheadNoResults = new core.EventEmitter();
/**
* fired when option was selected, return object with data of this option
*/
this.typeaheadOnSelect = new core.EventEmitter();
/**
* fired when blur event occurs. returns the active item
*/
this.typeaheadOnBlur = new core.EventEmitter();
/**
* This attribute indicates that the dropdown should be opened upwards
*/
this.dropup = false;
this.isActiveItemChanged = false;
this.isTypeaheadOptionsListActive = false;
// tslint:disable-next-line:no-any
this.keyUpEventEmitter = new core.EventEmitter();
this.placement = 'bottom-left';
this._subscriptions = [];
this._typeahead = cis.createLoader(element, viewContainerRef, renderer)
.provide({ provide: TypeaheadConfig, useValue: config });
Object.assign(this, { typeaheadHideResultsOnBlur: config.hideResultsOnBlur,
typeaheadSelectFirstItem: config.selectFirstItem,
typeaheadMinLength: config.minLength,
adaptivePosition: config.adaptivePosition
});
}
/**
* @return {?}
*/
TypeaheadDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.typeaheadOptionsLimit = this.typeaheadOptionsLimit || 20;
this.typeaheadMinLength =
this.typeaheadMinLength === void 0 ? 1 : this.typeaheadMinLength;
this.typeaheadWaitMs = this.typeaheadWaitMs || 0;
// async should be false in case of array
if (this.typeaheadAsync === undefined &&
!(rxjs.isObservable(this.typeahead))) {
this.typeaheadAsync = false;
}
if (rxjs.isObservable(this.typeahead)) {
this.typeaheadAsync = true;
}
if (this.typeaheadAsync) {
this.asyncActions();
}
else {
this.syncActions();
}
};
/**
* @param {?} e
* @return {?}
*/
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
TypeaheadDirective.prototype.onInput = /**
* @param {?} e
* @return {?}
*/
// tslint:disable-next-line:no-any
function (e) {
// For `<input>`s, use the `value` property. For others that don't have a
// `value` (such as `<span contenteditable="true">`), use either
// `textContent` or `innerText` (depending on which one is supported, i.e.
// Firefox or IE).
var /** @type {?} */ value = e.target.value !== undefined
? e.target.value
: e.target.textContent !== undefined
? e.target.textContent
: e.target.innerText;
if (value != null && value.trim().length >= this.typeaheadMinLength) {
this.typeaheadLoading.emit(true);
this.keyUpEventEmitter.emit(e.target.value);
}
else {
this.typeaheadLoading.emit(false);
this.typeaheadNoResults.emit(false);
this.hide();
}
};
/**
* @param {?} event
* @return {?}
*/
TypeaheadDirective.prototype.onChange = /**
* @param {?} event
* @return {?}
*/
function (event) {
if (this._container) {
// esc
/* tslint:disable-next-line: deprecation */
if (event.keyCode === 27 || event.key === 'Escape') {
this.hide();
return;
}
// up
/* tslint:disable-next-line: deprecation */
if (event.keyCode === 38 || event.key === 'ArrowUp') {
this.isActiveItemChanged = true;
this._container.prevActiveMatch();
return;
}
// down
/* tslint:disable-next-line: deprecation */
if (event.keyCode === 40 || event.key === 'ArrowDown') {
this.isActiveItemChanged = true;
this._container.nextActiveMatch();
return;
}
}
};
/**
* @return {?}
*/
TypeaheadDirective.prototype.onFocus = /**
* @return {?}
*/
function () {
if (this.typeaheadMinLength === 0) {
this.typeaheadLoading.emit(true);
this.keyUpEventEmitter.emit(this.element.nativeElement.value || '');
}
};
/**
* @return {?}
*/
TypeaheadDirective.prototype.onBlur = /**
* @return {?}
*/
function () {
if (this._container && !this._container.isFocused) {
this.typeaheadOnBlur.emit(this._container.active);
}
};
/**
* @param {?} event
* @return {?}
*/
TypeaheadDirective.prototype.onKeydown = /**
* @param {?} event
* @return {?}
*/
function (event) {
// no container - no problems
if (!this._container) {
return;
}
/* tslint:disable-next-line: deprecation */
if (event.keyCode === 9 || event.key === 'Tab' || event.keyCode === 13 || event.key === 'Enter') {
event.preventDefault();
if (this.typeaheadSelectFirstItem) {
this._container.selectActiveMatch();
return;
}
if (!this.typeaheadSelectFirstItem) {
this._container.selectActiveMatch(this.isActiveItemChanged);
this.isActiveItemChanged = false;
this.hide();
}
}
};
/**
* @param {?} match
* @return {?}
*/
TypeaheadDirective.prototype.changeModel = /**
* @param {?} match
* @return {?}
*/
function (match) {
var /** @type {?} */ valueStr = match.value;
this.ngControl.viewToModelUpdate(valueStr);
(this.ngControl.control).setValue(v