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

dmn-js-shared

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmn-js-shared - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

lib/components/InputSelect.js

4

package.json
{
"name": "dmn-js-shared",
"description": "Shared components used by dmn-js",
"version": "2.0.2",
"version": "2.1.0",
"scripts": {

@@ -11,2 +11,3 @@ "test": "karma start",

"devDependencies": {
"didi": "^3.0.0",
"inferno-test-utils": "^4.0.0",

@@ -17,3 +18,2 @@ "stringify": "^5.1.0"

"diagram-js": "^0.29.0",
"didi": "^3.0.0",
"dmn-moddle": "^3.0.1",

@@ -20,0 +20,0 @@ "ids": "^0.2.0",

@@ -0,1 +1,3 @@

import { query as domQuery } from 'min-dom';
export function triggerInputEvent(element, text) {

@@ -16,7 +18,7 @@ if (element.tagName === 'INPUT') {

export function triggerClick(el, clientX, clientY) {
triggerMouseEvent(el, 'click', clientX, clientY);
export function triggerClick(el, clientX, clientY, ctrlKey) {
triggerMouseEvent(el, 'click', clientX, clientY, ctrlKey);
}
export function triggerMouseEvent(element, event, clientX, clientY) {
export function triggerMouseEvent(element, event, clientX, clientY, ctrlKey = false) {
const e = document.createEvent('MouseEvent');

@@ -27,3 +29,3 @@

event, true, true, window, 0, 0, 0,
clientX, clientY, false, false, false, false,
clientX, clientY, ctrlKey, false, false, false,
0, null

@@ -57,2 +59,10 @@ );

element.dispatchEvent(e);
}
export function triggerInputSelectChange(inputSelect, value, testContainer) {
triggerClick(inputSelect);
const option = domQuery(`.option[data-value="${ value }"]`, testContainer);
triggerClick(option);
}
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