asap-feed-beta 12.6.0 → 12.6.1
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/bundles/asap-feed-beta.umd.js +18 -16
- package/bundles/asap-feed-beta.umd.js.map +1 -1
- package/bundles/asap-feed-beta.umd.min.js +1 -1
- package/bundles/asap-feed-beta.umd.min.js.map +1 -1
- package/esm2015/lib/components/auto-complete/auto-complete.component.js +19 -17
- package/esm5/lib/components/auto-complete/auto-complete.component.js +19 -17
- package/fesm2015/asap-feed-beta.js +18 -16
- package/fesm2015/asap-feed-beta.js.map +1 -1
- package/fesm5/asap-feed-beta.js +18 -16
- package/fesm5/asap-feed-beta.js.map +1 -1
- package/package.json +1 -1
|
@@ -7026,18 +7026,20 @@
|
|
|
7026
7026
|
* @return {?}
|
|
7027
7027
|
*/
|
|
7028
7028
|
function (selected) {
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7029
|
+
if (this.input) {
|
|
7030
|
+
/** @type {?} */
|
|
7031
|
+
var value = this.input.value;
|
|
7032
|
+
/** @type {?} */
|
|
7033
|
+
var shift = 1 + selected.name.length - this.mark.length;
|
|
7034
|
+
this.input.value = value.substring(0, this.startPosition) + ("@" + selected.name) + value.substring(this.endPosition);
|
|
7035
|
+
/** @type {?} */
|
|
7036
|
+
var evento = new Event('input');
|
|
7037
|
+
this.input.dispatchEvent(evento);
|
|
7038
|
+
this.userSelected.emit(selected);
|
|
7039
|
+
this.input.selectionStart = this.endPosition + shift;
|
|
7040
|
+
this.input.selectionEnd = this.endPosition + shift;
|
|
7041
|
+
this.input.focus();
|
|
7042
|
+
}
|
|
7041
7043
|
};
|
|
7042
7044
|
/**
|
|
7043
7045
|
* @param {?} position
|
|
@@ -7050,12 +7052,12 @@
|
|
|
7050
7052
|
function (position) {
|
|
7051
7053
|
/** @type {?} */
|
|
7052
7054
|
var cursorPosition = position;
|
|
7053
|
-
|
|
7054
|
-
var phrase = this.input.value;
|
|
7055
|
-
if (cursorPosition === 0) {
|
|
7055
|
+
if (!this.input || !this.input.value || cursorPosition === 0) {
|
|
7056
7056
|
return "";
|
|
7057
7057
|
}
|
|
7058
7058
|
/** @type {?} */
|
|
7059
|
+
var phrase = this.input.value;
|
|
7060
|
+
/** @type {?} */
|
|
7059
7061
|
var words = phrase.split(' ');
|
|
7060
7062
|
/** @type {?} */
|
|
7061
7063
|
var startPosition = 0;
|
|
@@ -7069,7 +7071,7 @@
|
|
|
7069
7071
|
this.endPosition = endPosition;
|
|
7070
7072
|
return words[i];
|
|
7071
7073
|
}
|
|
7072
|
-
return
|
|
7074
|
+
return "";
|
|
7073
7075
|
}
|
|
7074
7076
|
startPosition = endPosition + 1;
|
|
7075
7077
|
endPosition = startPosition;
|