Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private updateContent(params: TextParams) {
this.renderedHTML = this.sanitizer.bypassSecurityTrustHtml(text(this.content || '', params).html.join('\n'));
}
}
render (createElement, context) {
const { familyPrefix } = config
const { props } = context
const classes = objectWithKey('classes', [
...(props.counter ? [`${familyPrefix}-layers-counter`] : []),
...(props.position ? [`${familyPrefix}-layers-${props.position}`] : [])
]);
const transform = objectWithKey('transform', (typeof props.transform === 'string') ? parse.transform(props.transform) : props.transform)
const renderedText = text(props.value.toString(), { ...transform, ...classes })
const { abstract } = renderedText
if (props.counter) {
abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', '')
}
const convertCurry = convert.bind(null, createElement)
return convertCurry(abstract[0], {}, context.data)
}
}
render: function render(createElement, context) {
var familyPrefix = config.familyPrefix;
var props = context.props;
var classes = objectWithKey('classes', [].concat(toConsumableArray(props.counter ? [familyPrefix + '-layers-counter'] : []), toConsumableArray(props.position ? [familyPrefix + '-layers-' + props.position] : [])));
var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform);
var renderedText = text(props.value.toString(), _extends({}, transform, classes));
var abstract = renderedText.abstract;
if (props.counter) {
abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', '');
}
var convertCurry = convert.bind(null, createElement);
return convertCurry(abstract[0], {}, context.data);
}
};