@stemy/ngx-utils 19.3.4 → 19.3.5
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.
|
@@ -1671,21 +1671,36 @@ class GenericValue extends Subject {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
|
|
1673
1673
|
class FileSystemEntry {
|
|
1674
|
-
|
|
1674
|
+
get parent() {
|
|
1675
|
+
return this.level === 0 ? null : this.path[this.level - 1] || null;
|
|
1676
|
+
}
|
|
1677
|
+
constructor(label, meta, image, data, openCb, parent = null, classes) {
|
|
1675
1678
|
this.label = label;
|
|
1676
1679
|
this.meta = meta;
|
|
1677
1680
|
this.image = image;
|
|
1678
1681
|
this.data = data;
|
|
1679
|
-
this.parent = parent;
|
|
1680
1682
|
this.openCb = openCb;
|
|
1681
1683
|
this.path = !parent ? [this] : parent.path.concat([this]);
|
|
1682
1684
|
this.level = this.path.length - 1;
|
|
1683
|
-
this.classes = this.path
|
|
1684
|
-
.
|
|
1685
|
-
.
|
|
1685
|
+
this.classes = [`level-${this.level}`].concat(classes ?? this.path
|
|
1686
|
+
.map(t => {
|
|
1687
|
+
if (ObjectUtils.isString(t.data)) {
|
|
1688
|
+
return t.data;
|
|
1689
|
+
}
|
|
1690
|
+
if (ObjectUtils.isObject(t.data)) {
|
|
1691
|
+
const list = Object.keys(t.data).map(k => {
|
|
1692
|
+
const value = t.data[k];
|
|
1693
|
+
return ObjectUtils.isString(value) && value.length > 0 && value.length < 50
|
|
1694
|
+
? `${k}-${value}`
|
|
1695
|
+
: null;
|
|
1696
|
+
});
|
|
1697
|
+
return list.filter(i => !!i).join(" ");
|
|
1698
|
+
}
|
|
1699
|
+
return null;
|
|
1700
|
+
}).filter(t => !!t));
|
|
1686
1701
|
}
|
|
1687
1702
|
open() {
|
|
1688
|
-
this.result = this.result || this.openCb(this
|
|
1703
|
+
this.result = this.result || this.openCb(this);
|
|
1689
1704
|
this.result.then(res => {
|
|
1690
1705
|
if (Array.isArray(res))
|
|
1691
1706
|
return;
|