@dev-tcloud/tcloud-ui 0.0.67 → 0.0.69
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/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.mjs +18 -16
- package/esm2020/lib/_pipes/respective.mjs +15 -10
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +31 -24
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +31 -24
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_pipes/respective.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1209,19 +1209,19 @@ class TCloudUiDataListComponent {
|
|
|
1209
1209
|
this.onChangeCallback = noop$5;
|
|
1210
1210
|
}
|
|
1211
1211
|
set disabled(v) {
|
|
1212
|
-
if (v) {
|
|
1212
|
+
if (typeof v === 'boolean' && v !== this._disabled) {
|
|
1213
1213
|
this._disabled = v;
|
|
1214
|
-
this.selected_description = '';
|
|
1215
|
-
this.selected_item =
|
|
1214
|
+
//this.selected_description = '';
|
|
1215
|
+
//this.selected_item ='';
|
|
1216
1216
|
this.toChange();
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
get disabled() { return this._disabled; }
|
|
1220
1220
|
set loading(v) {
|
|
1221
|
-
if (v) {
|
|
1221
|
+
if (typeof v === 'boolean' && v !== this._loading) {
|
|
1222
1222
|
this._loading = v;
|
|
1223
|
-
this.selected_description = '';
|
|
1224
|
-
this.selected_item = '';
|
|
1223
|
+
//this.selected_description = '';
|
|
1224
|
+
//this.selected_item = '';
|
|
1225
1225
|
this.toChange();
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
@@ -1291,15 +1291,17 @@ class TCloudUiDataListComponent {
|
|
|
1291
1291
|
let input = (e && e.target && e.target.value) ? e.target.value : '';
|
|
1292
1292
|
let filter = (((input).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
|
|
1293
1293
|
let ul = document.getElementById(`${this.id}-options`);
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1294
|
+
if (ul) {
|
|
1295
|
+
let li = ul.getElementsByTagName("button");
|
|
1296
|
+
for (let i = 0; i < li.length; i++) {
|
|
1297
|
+
const a = li[i];
|
|
1298
|
+
const txtValue = (((a.textContent || a.innerText).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
|
|
1299
|
+
if (txtValue.indexOf(filter) > -1) {
|
|
1300
|
+
li[i].style.display = "";
|
|
1301
|
+
}
|
|
1302
|
+
else {
|
|
1303
|
+
li[i].style.display = "none";
|
|
1304
|
+
}
|
|
1303
1305
|
}
|
|
1304
1306
|
}
|
|
1305
1307
|
}
|
|
@@ -1972,18 +1974,23 @@ class RespectivePipe {
|
|
|
1972
1974
|
}
|
|
1973
1975
|
transform(v) {
|
|
1974
1976
|
if (v !== undefined && v !== null && v !== '') {
|
|
1975
|
-
|
|
1976
|
-
let
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1977
|
+
if (typeof v === 'string') {
|
|
1978
|
+
for (let i = 0; i < (this.map).length; i++) {
|
|
1979
|
+
let custom_v = v;
|
|
1980
|
+
custom_v = (custom_v).toLowerCase();
|
|
1981
|
+
custom_v = (custom_v).trim();
|
|
1982
|
+
custom_v = (custom_v).replace(/\_/g, "-");
|
|
1983
|
+
const current_key = (this.map[i].key).replace(/\_/g, "-");
|
|
1984
|
+
if ((custom_v).toLowerCase() === current_key) {
|
|
1985
|
+
return `${this.map[i].value}`;
|
|
1986
|
+
}
|
|
1983
1987
|
}
|
|
1984
1988
|
}
|
|
1989
|
+
else {
|
|
1990
|
+
return '';
|
|
1991
|
+
}
|
|
1985
1992
|
}
|
|
1986
|
-
return v
|
|
1993
|
+
return `${v}`;
|
|
1987
1994
|
}
|
|
1988
1995
|
}
|
|
1989
1996
|
RespectivePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|