@vaadin/vaadin-context-menu 22.0.0-beta1 → 22.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -73
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,78 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vaadin/vaadin-context-menu
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[API documentation ↗](https://vaadin.com/components/vaadin-context-menu/html-api)
|
|
3
|
+
> ⚠️ Starting from Vaadin 22, this package is deprecated.
|
|
4
|
+
> Please use [`@vaadin/context-menu`](https://www.npmjs.com/package/@vaadin/context-menu) instead.
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
A web component that can be attached to any component to display a context menu.
|
|
8
7
|
|
|
9
|
-
[
|
|
10
|
-
[](https://vaadin.com/directory/component/vaadinvaadin-context-menu)
|
|
11
|
-
[](https://discord.gg/PHmkCKC)
|
|
12
|
-
|
|
13
|
-
```html
|
|
14
|
-
<vaadin-context-menu>
|
|
15
|
-
<span>Open a context menu with <b>right click</b> or with <b>long touch.</b></span>
|
|
16
|
-
</vaadin-context-menu>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
const contextMenu = document.querySelector('vaadin-context-menu');
|
|
20
|
-
contextMenu.renderer = function (root) {
|
|
21
|
-
let listBox = root.firstElementChild;
|
|
22
|
-
// Check if there is a list-box generated with the previous renderer call to update its content instead of recreation
|
|
23
|
-
if (listBox) {
|
|
24
|
-
listBox.innerHTML = '';
|
|
25
|
-
} else {
|
|
26
|
-
listBox = document.createElement('vaadin-list-box');
|
|
27
|
-
root.appendChild(listBox);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
['First', 'Second', 'Third'].forEach(function (name) {
|
|
31
|
-
const item = document.createElement('vaadin-item');
|
|
32
|
-
item.textContent = name + ' menu item';
|
|
33
|
-
listBox.appendChild(item);
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
</script>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
[<img src="https://raw.githubusercontent.com/vaadin/vaadin-context-menu/master/screenshot.png" width="493" alt="Screenshot of vaadin-context-menu">](https://vaadin.com/components/vaadin-context-menu)
|
|
40
|
-
|
|
41
|
-
**Note:** [`<vaadin-list-box>`](https://github.com/vaadin/vaadin-list-box) component used in the above example should be installed and imported separately.
|
|
42
|
-
|
|
43
|
-
## Installation
|
|
44
|
-
|
|
45
|
-
Install `vaadin-context-menu`:
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
npm i @vaadin/vaadin-context-menu --save
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Once installed, import it in your application:
|
|
52
|
-
|
|
53
|
-
```js
|
|
54
|
-
import '@vaadin/vaadin-context-menu/vaadin-context-menu.js';
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Getting started
|
|
58
|
-
|
|
59
|
-
Vaadin components use the Lumo theme by default.
|
|
60
|
-
|
|
61
|
-
To use the Material theme, import the correspondent file from the `theme/material` folder.
|
|
62
|
-
|
|
63
|
-
## Entry points
|
|
64
|
-
|
|
65
|
-
- The component with the Lumo theme:
|
|
66
|
-
|
|
67
|
-
`theme/lumo/vaadin-context-menu.js`
|
|
68
|
-
|
|
69
|
-
- The component with the Material theme:
|
|
70
|
-
|
|
71
|
-
`theme/material/vaadin-context-menu.js`
|
|
72
|
-
|
|
73
|
-
- Alias for `theme/lumo/vaadin-context-menu.js`:
|
|
74
|
-
|
|
75
|
-
`vaadin-context-menu.js`
|
|
8
|
+
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/context-menu)
|
|
76
9
|
|
|
77
10
|
## Contributing
|
|
78
11
|
|
|
@@ -82,4 +15,5 @@ Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/
|
|
|
82
15
|
|
|
83
16
|
Apache License 2.0
|
|
84
17
|
|
|
85
|
-
Vaadin collects development time
|
|
18
|
+
Vaadin collects usage statistics at development time to improve this product..
|
|
19
|
+
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-context-menu",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"polymer"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vaadin/context-menu": "22.0.
|
|
35
|
+
"@vaadin/context-menu": "^22.0.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "2b0a2bff0369d6020f7cc33ad35506aa2d1f6f68"
|
|
38
38
|
}
|