New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ewc-lib/ewc-menu

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ewc-lib/ewc-menu - npm Package Compare versions

Comparing version 0.1.6-alpha to 0.1.7-alpha

src/html.js

4

package.json
{
"name": "@ewc-lib/ewc-menu",
"version": "0.1.6-alpha",
"version": "0.1.7-alpha",
"description": "",
"main": "src/main.mjs",
"main": "src/main.js",
"scripts": {

@@ -7,0 +7,0 @@ },

@@ -9,7 +9,10 @@ # Screenshot

- **data** - expects a map, key=main-menu item, value=[array of sub-menu items]. see example below.
- **select** - expects a key of the map or the id of a sub-menu
- **data** - set contents of the menu. expects a map, key=main-menu item, value=[array of sub-menu items]. see example below.
- **select** - sets currently selected item. expects a key of the map or the id of a sub-menu.
- **onSelect** - a callback which is called when a menu/submenu item was selected
- callback signature: myCallback(subMenuId, menuId, isMainMenuItem)
- isMainMenuItem === true means, main-menu item was selected
- Note: subMenuId === menuId in that case
Note that any menu-item-id === name/text of item.
Note: Any menu-item-id === name/text of the item.

@@ -21,3 +24,3 @@ # Usage with WebPack

"dependencies": {
"@ewc-lib/ewc-menu": "^0.1.0"
"@ewc-lib/ewc-menu": "latest"
}

@@ -27,4 +30,2 @@

const CopyPlugin = require("copy-webpack-plugin")
...

@@ -42,10 +43,3 @@

]
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "./node_modules/@ewc-lib/ewc-menu/assets/*", to: "./assets/[name][ext]" }
],
}),
],
}

@@ -64,3 +58,4 @@ ## index.html

el.data = d
el.onSelect = (subMenuId, menuId) => console.log(`Menu selection: ${menuId} ${subMenuId} `)
el.onSelect = (subMenuId, menuId, isMainMenuItem) =>
alert(`Menu selection: ${menuId} ${subMenuId}\nWas a main menu item selected? -> ${isMainMenuItem}`)
el.select = "Cut"

@@ -71,5 +66,5 @@ })

## index.js
## main.js
import "@ewc-lib/ewc-menu"
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