@vaadin/vaadin-themable-mixin
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -12,3 +12,3 @@ { | ||
"name": "@vaadin/vaadin-themable-mixin", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"main": "vaadin-themable-mixin.js", | ||
@@ -15,0 +15,0 @@ "author": "Vaadin Ltd", |
@@ -35,15 +35,26 @@ import { DomModule } from '@polymer/polymer/lib/elements/dom-module.js'; | ||
Object.keys(modules).forEach(moduleName => { | ||
if (moduleName !== defaultModuleName) { | ||
const themeFor = modules[moduleName].getAttribute('theme-for'); | ||
if (themeFor) { | ||
themeFor.split(' ').forEach(themeForToken => { | ||
if (new RegExp('^' + themeForToken.split('*').join('.*') + '$').test(this.is)) { | ||
hasThemes = true; | ||
this._includeStyle(moduleName, template); | ||
} | ||
}); | ||
Object.keys(modules) | ||
.sort((moduleNameA, moduleNameB) => { | ||
const vaadinA = moduleNameA.indexOf('vaadin-') === 0; | ||
const vaadinB = moduleNameB.indexOf('vaadin-') === 0; | ||
if (vaadinA !== vaadinB) { | ||
return vaadinA ? -1 : 1; | ||
} else { | ||
return 0; | ||
} | ||
} | ||
}); | ||
}) | ||
.forEach(moduleName => { | ||
if (moduleName !== defaultModuleName) { | ||
const themeFor = modules[moduleName].getAttribute('theme-for'); | ||
if (themeFor) { | ||
themeFor.split(' ').forEach(themeForToken => { | ||
if (new RegExp('^' + themeForToken.split('*').join('.*') + '$').test(this.is)) { | ||
hasThemes = true; | ||
this._includeStyle(moduleName, template); | ||
} | ||
}); | ||
} | ||
} | ||
}); | ||
@@ -50,0 +61,0 @@ if (!hasThemes && modules[defaultModuleName]) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28801
89