@symbo.ls/utils
Advanced tools
Comparing version 2.11.405 to 2.11.410
@@ -610,4 +610,5 @@ "use strict"; | ||
exec: () => exec, | ||
findExtendsInElement: () => findExtendsInElement, | ||
flattenRecursive: () => flattenRecursive, | ||
getChildrenComponentsByKey: () => getChildrenComponentsByKey, | ||
getExtendsInElement: () => getExtendsInElement, | ||
hasOwnProperty: () => hasOwnProperty, | ||
@@ -1101,3 +1102,14 @@ isEmpty: () => isEmpty, | ||
}; | ||
var findExtendsInElement = (obj) => { | ||
var getChildrenComponentsByKey = (key, el) => { | ||
if (key === el.key || el.__ref.__componentKey === key) { | ||
return el; | ||
} | ||
if (el.extend) { | ||
const foundString = (0, import_types.isString)(el.extend) && el.extend === key; | ||
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length; | ||
if (foundString || foundInArray) | ||
return el; | ||
} | ||
}; | ||
var getExtendsInElement = (obj) => { | ||
let result = []; | ||
@@ -1104,0 +1116,0 @@ function traverse(o) { |
@@ -610,4 +610,5 @@ "use strict"; | ||
exec: () => exec, | ||
findExtendsInElement: () => findExtendsInElement, | ||
flattenRecursive: () => flattenRecursive, | ||
getChildrenComponentsByKey: () => getChildrenComponentsByKey, | ||
getExtendsInElement: () => getExtendsInElement, | ||
hasOwnProperty: () => hasOwnProperty, | ||
@@ -1101,3 +1102,14 @@ isEmpty: () => isEmpty, | ||
}; | ||
var findExtendsInElement = (obj) => { | ||
var getChildrenComponentsByKey = (key, el) => { | ||
if (key === el.key || el.__ref.__componentKey === key) { | ||
return el; | ||
} | ||
if (el.extend) { | ||
const foundString = (0, import_types.isString)(el.extend) && el.extend === key; | ||
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length; | ||
if (foundString || foundInArray) | ||
return el; | ||
} | ||
}; | ||
var getExtendsInElement = (obj) => { | ||
let result = []; | ||
@@ -1104,0 +1116,0 @@ function traverse(o) { |
@@ -610,4 +610,5 @@ "use strict"; | ||
exec: () => exec, | ||
findExtendsInElement: () => findExtendsInElement, | ||
flattenRecursive: () => flattenRecursive, | ||
getChildrenComponentsByKey: () => getChildrenComponentsByKey, | ||
getExtendsInElement: () => getExtendsInElement, | ||
hasOwnProperty: () => hasOwnProperty, | ||
@@ -1101,3 +1102,14 @@ isEmpty: () => isEmpty, | ||
}; | ||
var findExtendsInElement = (obj) => { | ||
var getChildrenComponentsByKey = (key, el) => { | ||
if (key === el.key || el.__ref.__componentKey === key) { | ||
return el; | ||
} | ||
if (el.extend) { | ||
const foundString = (0, import_types.isString)(el.extend) && el.extend === key; | ||
const foundInArray = (0, import_types.isArray)(el.extend) && el.extend.filter((v) => v === key).length; | ||
if (foundString || foundInArray) | ||
return el; | ||
} | ||
}; | ||
var getExtendsInElement = (obj) => { | ||
let result = []; | ||
@@ -1104,0 +1116,0 @@ function traverse(o) { |
{ | ||
"name": "@symbo.ls/utils", | ||
"version": "2.11.405", | ||
"version": "2.11.410", | ||
"author": "symbo.ls", | ||
@@ -29,3 +29,3 @@ "files": [ | ||
}, | ||
"gitHead": "a30570ff792bb87f8e4851a094f891545881de43" | ||
"gitHead": "8ea25d0b8ce6086f6892b69b372af85f80391a80" | ||
} |
191080
5172