bruce-models 1.2.8 → 1.2.9
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/dist/bruce-models.es5.js +12 -0
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +12 -0
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/entity/entity-attribute.js +12 -0
- package/dist/lib/entity/entity-attribute.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/types/entity/entity-attribute.d.ts +1 -0
- package/dist/types/project/menu-item.d.ts +4 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -4069,6 +4069,18 @@
|
|
|
4069
4069
|
EType["Dictionary"] = "Dictionary";
|
|
4070
4070
|
EType["Boolean"] = "Boolean";
|
|
4071
4071
|
})(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
|
|
4072
|
+
function GetAttribute(items, path) {
|
|
4073
|
+
if (!items || !path || !path.length) {
|
|
4074
|
+
return null;
|
|
4075
|
+
}
|
|
4076
|
+
const key = path[0];
|
|
4077
|
+
const item = items.find((i) => i.Key === key);
|
|
4078
|
+
if (!item || !item.Structure || !path.length) {
|
|
4079
|
+
return item;
|
|
4080
|
+
}
|
|
4081
|
+
return GetAttribute(item.Structure, path.slice(1));
|
|
4082
|
+
}
|
|
4083
|
+
EntityAttribute.GetAttribute = GetAttribute;
|
|
4072
4084
|
})(exports.EntityAttribute || (exports.EntityAttribute = {}));
|
|
4073
4085
|
|
|
4074
4086
|
(function (ClientFile) {
|