export function formatLanguageLocale(data) { const array = []; forEach(split(data, '_'), (value, key) => { if (key === 0){ array.push(toLower(value)); } else { array.push(upperCase(value)); } }); return array; }
map(contentType.attributes, (attr, key) => { if (get(attr.params, 'target') === replace(split(this.props.hash, '::')[0], '#edit', '')) { contentType.attributes[key].params.target = this.props.modifiedDataEdit.name; } });
const set = (obj, path, value) => { const keys = split(path, "."); const next = reduceRight( keys, (nextValues, key) => { if (isEmpty(nextValues)) { return { [key]: value }; } return { [key]: { ...obj[key], ...nextValues } }; }, {} ); return { ...obj, ...next }; }
function getDataFromConfigs(configs) { const data = {}; forEach(configs.sections, (section) => { forEach(section.items, (item) => { data[item.target] = item.value; if (has(item, 'items')) { forEach(item.items, (itemValue) => { data[itemValue.target] = itemValue.value; }); } }); }); if (configs.name === 'form.security.name' && includes(split(get(data, 'security.xframe.value'), ' '), 'ALLOW-FROM')) { const allowFromValue = split(get(data, 'security.xframe.value'), ' ')[0]; const allowFromValueNested = split(get(data, 'security.xframe.value'), ' ')[1]; data['security.xframe.value'] = allowFromValue; data['security.xframe.value.nested'] = allowFromValueNested; } return data; }
if (includes(target, 'enabled') && !bodyValue) disabledSections.push(split(target, '.')[1]); });
export default function checkAttributeValidations(errors) { const attributeIndex = split(this.props.hash, '::')[3]; const sameAttributes = filter(this.props.contentTypeData.attributes, (attr) => attr.name === this.props.modifiedDataAttribute.name); const sameParamsKey = filter(this.props.contentTypeData.attributes, (attr) =>
const dynamicTarget = join(pullAt(split(props.target, '.'),['0', '1', '3', '4']), '.');