@lambo-design/shared 1.0.0-beta.234 → 1.0.0-beta.236

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/platform.js +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.234",
3
+ "version": "1.0.0-beta.236",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
package/utils/platform.js CHANGED
@@ -1320,3 +1320,15 @@ export const buildHomeConfigs = (settings) => {
1320
1320
  }
1321
1321
  return result;
1322
1322
  }
1323
+
1324
+ export const getAllElements = ( plist = [], result = []) => {
1325
+ for (let obj of plist) {
1326
+ if (obj.permissionId) {
1327
+ result.push(obj.permissionId);
1328
+ }
1329
+ if (obj.children && obj.children.length > 0) {
1330
+ getAllElements(obj.children, result);
1331
+ }
1332
+ }
1333
+ return result;
1334
+ }