Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
as: function(props, propName) {
const prop = props[propName];
const err = `Warning: '${prop}' passed to '${ComposedComponent}' component is not a valid html tag.`;
/* eslint-disable no-console */
return checkTag.includes(prop) ? null : console.error(err);
},
forceInterpolate: PropTypes.objectOf((propValue, key) => {
as: function (props, propName) {
const prop = props[propName];
const err = `Warning: '${prop}' passed to 'Merge' component is not a valid html tag.`;
/* eslint-disable no-console */
return checkTag.includes(prop) ? null : console.error(err);
},
component: PropTypes.func,
as: function (props, propName) {
const prop = props[propName];
const err = `Warning: '${prop}' passed to '${ComposedComponent}' component is not a valid html tag.`;
/* eslint-disable no-console */
return checkTag.includes(prop) ? null : console.error(err);
},
forceInterpolate: PropTypes.objectOf((propValue, key) => {
as: function(props, propName) {
const prop = props[propName];
const err = `Warning: '${prop}' passed to 'Merge' component is not a valid html tag.`;
/* eslint-disable no-console */
return checkTag.includes(prop) ? null : console.error(err);
},
component: PropTypes.func
function getStylesheet(rules, root) {
if (!domElements.includes(root)) {
return {};
}
let arr = [];
arr.push(
...getRules(rules, root),
...supportRules(rules, root),
...mediaRules(rules, root),
);
return arr;
}
function getStylesheet(rules, root) {
if (!domElements.includes(root)) {
return {}
}
const arr = []
arr.push(
...getRules(rules, root),
...supportRules(rules, root),
...mediaRules(rules, root)
)
return arr
}
function tokenizeVueComponents (eat, value) {
value = getValue(value)
if (isTag(value)) {
const [, name] = value.match(/^<\/?([\w-]+)[>\s]/) || []
if (name && !htmlTags.includes(name)) {
return eat(value)({ type: 'html', value })
}
}
}
let transform = (content, data) => {
let re = /<(.*?)>/g;
let matches = content.match(re);
if (!matches) return content;
for (let match of matches) {
let variable = match.substring(1).substring(0, match.length - 2);
if (!htmlTags.includes(variable) && getData(data, variable)) {
content = content.replace(match, getData(data, variable));
}
}
return content;
};
constructor(props, context) {
super(props, context);
this.config = context.config || {};
this.tag = props.component || props.tag || (HTMLTags.includes(props.name) ? props.name : 'div');
this.module = props.module || context.module;
this.propModifiers = renderModifiers(getModifiersFromProps(props, Synergy.CssClassProps));
this.contextModifiers = renderModifiers(getModifiersFromProps(context.props && context.props[props.name], Synergy.CssClassProps));
this.passedModifiers = renderModifiers(props.modifiers);
this.modifiers = this.propModifiers + this.passedModifiers + this.contextModifiers;
this.classes = getModuleFromProps(props, props.className ? ' ' + props.className : '');
this.selector = `${this.module}_${props.name + this.modifiers}${this.classes}`.replace(/,/g, '_');
this.getEventHandlers([
props, this.config[props.name] ? this.config[props.name] : {}
]);
if (props.href) this.tag = 'a';
}
constructor(props, context) {
super(props, context);
increment++;
this.tag = props.component || props.tag || (HTMLTags.includes(props.name) ? props.name : 'div');
this.propModifiers = renderModifiers(getModifiersFromProps(props, Synergy.CssClassProps));
this.passedModifiers = renderModifiers(props.modifiers);
this.modifiers = this.propModifiers + this.passedModifiers;
this.classes = props.className ? ' ' + props.className : '';
this.classNames = getModuleFromProps(props, props.name + this.modifiers + this.classes);
this.id = (props.before || props.after) && !props.id ? `synergy-module-${increment}` : props.id;
this.ref = node => refHandler(node, props);
if (Synergy.CssClassProps) Synergy.CssClassProps.forEach(prop => {
if (Object.keys(props).includes(prop)) {
this.classNames = this.classNames + ' ' + prop
}
});
}