myrta-ui 1.1.29 → 1.1.31
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/fesm2020/myrta-ui.mjs
CHANGED
|
@@ -17466,6 +17466,9 @@ class FormulaEditorComponent {
|
|
|
17466
17466
|
this._itemList = items;
|
|
17467
17467
|
this._modifiedItemList.items = itemsMap;
|
|
17468
17468
|
this._modifiedItemList.regExp = new RegExp(items.map(s => s.label).join('|'), 'g');
|
|
17469
|
+
const { visibleValue } = this._transformValue(this._modifiedValue(this._inputValue), true);
|
|
17470
|
+
this.updateVisibleValue(visibleValue);
|
|
17471
|
+
this._detector.detectChanges();
|
|
17469
17472
|
}
|
|
17470
17473
|
get getErrorMessage() {
|
|
17471
17474
|
return this.invalidMessage || ErrorMessagesEnum[this.errorModel.errorType];
|
|
@@ -17549,7 +17552,9 @@ class FormulaEditorComponent {
|
|
|
17549
17552
|
this.onTouched();
|
|
17550
17553
|
}
|
|
17551
17554
|
_modifiedValue(value) {
|
|
17552
|
-
return value.replace(this._modifiedItemList.regExp, match =>
|
|
17555
|
+
return value.replace(this._modifiedItemList.regExp, match => {
|
|
17556
|
+
return this._modifiedItemList.items[match] ? `{${this._modifiedItemList.items[match]}}` : '';
|
|
17557
|
+
});
|
|
17553
17558
|
}
|
|
17554
17559
|
_transformValue(content, analise = false) {
|
|
17555
17560
|
const valueArray = content.split(/[\s\u00A0]+/).filter(Boolean);
|