@bulmil/react
Advanced tools
Comparing version 0.40.0 to 0.40.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.syncEvent = exports.isCoveredByReact = exports.getClassName = exports.attachProps = void 0; | ||
exports.syncEvent = exports.isCoveredByReact = exports.transformReactEventName = exports.getClassName = exports.attachProps = void 0; | ||
const case_1 = require("./case"); | ||
@@ -66,2 +66,13 @@ const attachProps = (node, newProps, oldProps = {}) => { | ||
/** | ||
* Transforms a React event name to a browser event name. | ||
*/ | ||
const transformReactEventName = (eventNameSuffix) => { | ||
switch (eventNameSuffix) { | ||
case 'doubleclick': | ||
return 'dblclick'; | ||
} | ||
return eventNameSuffix; | ||
}; | ||
exports.transformReactEventName = transformReactEventName; | ||
/** | ||
* Checks if an event is supported in the current execution environment. | ||
@@ -75,3 +86,3 @@ * @license Modernizr 3.0.0pre (Custom Build) | MIT | ||
else { | ||
const eventName = 'on' + eventNameSuffix; | ||
const eventName = 'on' + (0, exports.transformReactEventName)(eventNameSuffix); | ||
let isSupported = eventName in document; | ||
@@ -78,0 +89,0 @@ if (!isSupported) { |
@@ -61,2 +61,12 @@ import { camelToDashCase } from './case'; | ||
/** | ||
* Transforms a React event name to a browser event name. | ||
*/ | ||
export const transformReactEventName = (eventNameSuffix) => { | ||
switch (eventNameSuffix) { | ||
case 'doubleclick': | ||
return 'dblclick'; | ||
} | ||
return eventNameSuffix; | ||
}; | ||
/** | ||
* Checks if an event is supported in the current execution environment. | ||
@@ -70,3 +80,3 @@ * @license Modernizr 3.0.0pre (Custom Build) | MIT | ||
else { | ||
const eventName = 'on' + eventNameSuffix; | ||
const eventName = 'on' + transformReactEventName(eventNameSuffix); | ||
let isSupported = eventName in document; | ||
@@ -73,0 +83,0 @@ if (!isSupported) { |
export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void; | ||
export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string; | ||
/** | ||
* Transforms a React event name to a browser event name. | ||
*/ | ||
export declare const transformReactEventName: (eventNameSuffix: string) => string; | ||
/** | ||
* Checks if an event is supported in the current execution environment. | ||
@@ -5,0 +9,0 @@ * @license Modernizr 3.0.0pre (Custom Build) | MIT |
{ | ||
"name": "@bulmil/react", | ||
"sideEffects": false, | ||
"version": "0.40.0", | ||
"version": "0.40.1", | ||
"author": "Gomah", | ||
@@ -44,3 +44,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@bulmil/core": "0.40.0" | ||
"@bulmil/core": "0.40.1" | ||
}, | ||
@@ -51,3 +51,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "2bd19ad866898568d1e28b2122ca5b3e4dac582a" | ||
"gitHead": "943133f3c51a3c9a2d19722a2395190075de53c4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
116411
1382
+ Added@bulmil/core@0.40.1(transitive)
- Removed@bulmil/core@0.40.0(transitive)
Updated@bulmil/core@0.40.1