Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

carbon-components

Package Overview
Dependencies
Maintainers
5
Versions
1107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carbon-components - npm Package Compare versions

Comparing version 7.10.3 to 7.10.4

7

es/globals/js/mixins/init-component-by-event.js

@@ -51,4 +51,7 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

} else {
// To work around non-bubbling `focus` event, use `focusin` event instead of it's available, and "capture mode" otherwise
var hasFocusin = 'onfocusin' in (target.nodeType === Node.ELEMENT_NODE ? target.ownerDocument : target).defaultView;
var handles = effectiveOptions.initEventNames.map(function (name) {
return on(target, name, function (event) {
var eventName = name === 'focus' && hasFocusin ? 'focusin' : name;
return on(target, eventName, function (event) {
var element = eventMatches(event, effectiveOptions.selectorInit);

@@ -61,3 +64,3 @@ if (element && !_this2.components.has(element)) {

}
});
}, name === 'focus' && !hasFocusin);
});

@@ -64,0 +67,0 @@ return {

@@ -5,3 +5,3 @@ {

"homepage": "http://carbondesignsystem.com/",
"version": "7.10.3",
"version": "7.10.4",
"module": "es/index.js",

@@ -8,0 +8,0 @@ "main": "umd/index.js",

@@ -27,11 +27,16 @@ import eventMatches from '../misc/event-matches';

} else {
const handles = effectiveOptions.initEventNames.map(name => on(target, name, (event) => {
const element = eventMatches(event, effectiveOptions.selectorInit);
if (element && !this.components.has(element)) {
const component = this.create(element, options);
if (typeof component.createdByEvent === 'function') {
component.createdByEvent(event);
// To work around non-bubbling `focus` event, use `focusin` event instead of it's available, and "capture mode" otherwise
const hasFocusin = 'onfocusin' in (target.nodeType === Node.ELEMENT_NODE ? target.ownerDocument : target).defaultView;
const handles = effectiveOptions.initEventNames.map((name) => {
const eventName = name === 'focus' && hasFocusin ? 'focusin' : name;
return on(target, eventName, (event) => {
const element = eventMatches(event, effectiveOptions.selectorInit);
if (element && !this.components.has(element)) {
const component = this.create(element, options);
if (typeof component.createdByEvent === 'function') {
component.createdByEvent(event);
}
}
}
}));
}, name === 'focus' && !hasFocusin);
});
return {

@@ -38,0 +43,0 @@ release() {

@@ -59,4 +59,7 @@ (function (global, factory) {

} else {
// To work around non-bubbling `focus` event, use `focusin` event instead of it's available, and "capture mode" otherwise
var hasFocusin = 'onfocusin' in (target.nodeType === Node.ELEMENT_NODE ? target.ownerDocument : target).defaultView;
var handles = effectiveOptions.initEventNames.map(function (name) {
return (0, _on2.default)(target, name, function (event) {
var eventName = name === 'focus' && hasFocusin ? 'focusin' : name;
return (0, _on2.default)(target, eventName, function (event) {
var element = (0, _eventMatches2.default)(event, effectiveOptions.selectorInit);

@@ -69,3 +72,3 @@ if (element && !_this2.components.has(element)) {

}
});
}, name === 'focus' && !hasFocusin);
});

@@ -72,0 +75,0 @@ return {

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

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