New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@easyv/admin-utils

Package Overview
Dependencies
Maintainers
12
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easyv/admin-utils - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

8

dist/gui/config.d.ts

@@ -85,1 +85,9 @@ /**

export function getModelTypes(): string[];
export function findExpandedKeys(data: any, keys: any, expanedKeys?: any[]): {
tempExpanedKeys: any[];
expanedFather: boolean;
};
export function searchExpandedKeys(data: any, title: any, expanedKeys?: any[]): {
tempExpanedKeys: any[];
expanedFather: boolean;
};

92

dist/gui/config.js

@@ -14,3 +14,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getModelTypes = exports.getId = exports.getPanelWithStates = exports.getPanelOptions = exports.getComponentOptions = exports.getStateOptions = exports.filterLayersWithEvents = exports.getEvents = exports.getLayersWithCustomId = exports.getValueFromConfig = exports.getValueObjFromConfig = exports.isOldConfig = exports.isConfigShow = exports.isFullConfigShow = exports.transformToOldConfig = exports.transformConfig = exports.updateArrayWithObject = exports.mergeStyleConfig = exports.mergeConfig = exports.getConfig = exports.updateArrayConfig = exports.getComponentConfig = exports.getComponentDimension = exports.reduceConfig = exports.getScreenDimension = void 0;
exports.searchExpandedKeys = exports.findExpandedKeys = exports.getModelTypes = exports.getId = exports.getPanelWithStates = exports.getPanelOptions = exports.getComponentOptions = exports.getStateOptions = exports.filterLayersWithEvents = exports.getEvents = exports.getLayersWithCustomId = exports.getValueFromConfig = exports.getValueObjFromConfig = exports.isOldConfig = exports.isConfigShow = exports.isFullConfigShow = exports.transformToOldConfig = exports.transformConfig = exports.updateArrayWithObject = exports.mergeStyleConfig = exports.mergeConfig = exports.getConfig = exports.updateArrayConfig = exports.getComponentConfig = exports.getComponentDimension = exports.reduceConfig = exports.getScreenDimension = void 0;
const utils_js_1 = require("./utils.js");

@@ -603,15 +603,45 @@ const config_new_js_1 = require("./config.new.js");

exports.getComponentOptions = getComponentOptions;
function transformChildren(children, customer, componentsById) {
const marks = new Set();
const result = [];
if (Array.isArray(customer) && customer.length) {
customer.forEach((item) => {
const newItem = {};
if (item.children) {
newItem.title = item.name;
newItem.value = `childGroup(${item.id})`;
newItem.disabled = true;
newItem.children = item.children.map((child) => {
marks.add(child.id);
const component = componentsById[child.id];
return {
value: `$component(${child.id})`,
title: component ? component.name : `$component(${child.id})`
};
});
}
else {
marks.add(item.id);
const component = componentsById[item.id];
newItem.value = `$component(${item.id})`;
newItem.title = component ? component.name : `$component(${item.id})`;
}
result.push(newItem);
});
}
const filterComponentChildren = children.filter((d) => !marks.has(d));
filterComponentChildren.forEach((item) => {
const component = componentsById[item];
result.push({
value: `$component(${item})`,
title: component ? component.name : ''
});
});
return result;
}
function getComponentLayerWithChildren({ componentsById, id, name }, type) {
let component = componentsById[id] || {};
let { children = [] } = component;
let { children = [], customInfo = [] } = component;
if (children.length > 0) {
children = children.reduce((result, childId) => {
let child = componentsById[childId];
return child
? result.concat({
value: updateBindName(`component(${childId})`, type),
title: child.name
})
: result;
}, []);
children = transformChildren(children, customInfo, componentsById);
return {

@@ -760,1 +790,41 @@ title: name,

];
exports.findExpandedKeys = (data, keys, expanedKeys = []) => {
let [tempData, tempKeys, tempExpanedKeys] = [[...data], [...keys], [...expanedKeys]];
let expanedFather = false;
tempData.map((d) => {
if (tempKeys.includes(d.value)) {
tempExpanedKeys.push(d.value);
tempKeys = tempKeys.filter((v) => v.value !== d.value);
expanedFather = true;
}
if (d.children && d.children.length > 0) {
const childrenResult = Object.assign({}, exports.findExpandedKeys(d.children, tempKeys, tempExpanedKeys));
tempExpanedKeys = childrenResult.tempExpanedKeys;
if (childrenResult.expanedFather && !tempExpanedKeys.includes(d.value)) {
tempExpanedKeys.push(d.value);
tempKeys = tempKeys.filter((v) => v.value !== d.value);
expanedFather = true;
}
}
});
return { tempExpanedKeys, expanedFather };
};
exports.searchExpandedKeys = (data, title, expanedKeys = []) => {
let [tempData, tempTitle, tempExpanedKeys] = [[...data], title, [...expanedKeys]];
let expanedFather = false;
tempData.map((d) => {
if (d.title.indexOf(tempTitle) !== -1) {
tempExpanedKeys.push(d.value);
expanedFather = true;
}
if (d.children && d.children.length > 0) {
const childrenResult = Object.assign({}, exports.searchExpandedKeys(d.children, title, tempExpanedKeys));
tempExpanedKeys = childrenResult.tempExpanedKeys;
if (childrenResult.expanedFather && d.title.indexOf(tempTitle) === -1) {
tempExpanedKeys.push(d.value);
expanedFather = true;
}
}
});
return { tempExpanedKeys, expanedFather };
};

2

package.json
{
"name": "@easyv/admin-utils",
"version": "0.0.2",
"version": "0.0.3",
"description": "utils 集合",

@@ -5,0 +5,0 @@ "keywords": [],

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc