bruce-models 1.2.8 → 1.3.0
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 +5 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -4190,6 +4190,18 @@ var EntityAttribute;
|
|
|
4190
4190
|
EType["Dictionary"] = "Dictionary";
|
|
4191
4191
|
EType["Boolean"] = "Boolean";
|
|
4192
4192
|
})(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
|
|
4193
|
+
function GetAttribute(items, path) {
|
|
4194
|
+
if (!items || !path || !path.length) {
|
|
4195
|
+
return null;
|
|
4196
|
+
}
|
|
4197
|
+
const key = path[0];
|
|
4198
|
+
const item = items.find((i) => i.Key === key);
|
|
4199
|
+
if (!item || !item.Structure || !path.length) {
|
|
4200
|
+
return item;
|
|
4201
|
+
}
|
|
4202
|
+
return GetAttribute(item.Structure, path.slice(1));
|
|
4203
|
+
}
|
|
4204
|
+
EntityAttribute.GetAttribute = GetAttribute;
|
|
4193
4205
|
})(EntityAttribute || (EntityAttribute = {}));
|
|
4194
4206
|
|
|
4195
4207
|
/**
|