@vaadin/dashboard 24.6.0-alpha1
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/LICENSE +3 -0
- package/README.md +34 -0
- package/package.json +57 -0
- package/src/keyboard-controller.js +107 -0
- package/src/vaadin-dashboard-button.js +45 -0
- package/src/vaadin-dashboard-helpers.js +99 -0
- package/src/vaadin-dashboard-item-mixin.d.ts +20 -0
- package/src/vaadin-dashboard-item-mixin.js +355 -0
- package/src/vaadin-dashboard-layout-mixin.d.ts +28 -0
- package/src/vaadin-dashboard-layout-mixin.js +148 -0
- package/src/vaadin-dashboard-layout.d.ts +56 -0
- package/src/vaadin-dashboard-layout.js +70 -0
- package/src/vaadin-dashboard-section.d.ts +76 -0
- package/src/vaadin-dashboard-section.js +203 -0
- package/src/vaadin-dashboard-styles.js +143 -0
- package/src/vaadin-dashboard-widget.d.ts +101 -0
- package/src/vaadin-dashboard-widget.js +271 -0
- package/src/vaadin-dashboard.d.ts +290 -0
- package/src/vaadin-dashboard.js +489 -0
- package/src/widget-reorder-controller.js +247 -0
- package/src/widget-resize-controller.js +214 -0
- package/theme/lumo/vaadin-dashboard-button-styles.d.ts +2 -0
- package/theme/lumo/vaadin-dashboard-button-styles.js +8 -0
- package/theme/lumo/vaadin-dashboard-button.d.ts +1 -0
- package/theme/lumo/vaadin-dashboard-button.js +1 -0
- package/theme/lumo/vaadin-dashboard-layout-styles.d.ts +1 -0
- package/theme/lumo/vaadin-dashboard-layout-styles.js +11 -0
- package/theme/lumo/vaadin-dashboard-layout.d.ts +2 -0
- package/theme/lumo/vaadin-dashboard-layout.js +2 -0
- package/theme/lumo/vaadin-dashboard-section-styles.d.ts +5 -0
- package/theme/lumo/vaadin-dashboard-section-styles.js +22 -0
- package/theme/lumo/vaadin-dashboard-section.d.ts +3 -0
- package/theme/lumo/vaadin-dashboard-section.js +3 -0
- package/theme/lumo/vaadin-dashboard-styles.d.ts +1 -0
- package/theme/lumo/vaadin-dashboard-styles.js +16 -0
- package/theme/lumo/vaadin-dashboard-widget-styles.d.ts +9 -0
- package/theme/lumo/vaadin-dashboard-widget-styles.js +242 -0
- package/theme/lumo/vaadin-dashboard-widget.d.ts +3 -0
- package/theme/lumo/vaadin-dashboard-widget.js +3 -0
- package/theme/lumo/vaadin-dashboard.d.ts +4 -0
- package/theme/lumo/vaadin-dashboard.js +4 -0
- package/theme/material/vaadin-dashboard-layout.d.ts +1 -0
- package/theme/material/vaadin-dashboard-layout.js +1 -0
- package/theme/material/vaadin-dashboard-section.d.ts +1 -0
- package/theme/material/vaadin-dashboard-section.js +1 -0
- package/theme/material/vaadin-dashboard-widget.d.ts +1 -0
- package/theme/material/vaadin-dashboard-widget.js +1 -0
- package/theme/material/vaadin-dashboard.d.ts +3 -0
- package/theme/material/vaadin-dashboard.js +3 -0
- package/vaadin-dashboard-layout.d.ts +1 -0
- package/vaadin-dashboard-layout.js +3 -0
- package/vaadin-dashboard-section.d.ts +1 -0
- package/vaadin-dashboard-section.js +3 -0
- package/vaadin-dashboard-widget.d.ts +1 -0
- package/vaadin-dashboard-widget.js +3 -0
- package/vaadin-dashboard.d.ts +1 -0
- package/vaadin-dashboard.js +3 -0
- package/web-types.json +260 -0
- package/web-types.lit.json +146 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/dashboard",
|
|
4
|
+
"version": "24.6.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"framework": "lit",
|
|
7
|
+
"framework-config": {
|
|
8
|
+
"enable-when": {
|
|
9
|
+
"node-packages": [
|
|
10
|
+
"lit"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contributions": {
|
|
15
|
+
"html": {
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
18
|
+
"name": "vaadin-dashboard-layout",
|
|
19
|
+
"description": "A responsive, grid-based dashboard layout component\n\n```html\n<vaadin-dashboard-layout>\n <vaadin-dashboard-widget widget-title=\"Widget 1\"></vaadin-dashboard-widget>\n <vaadin-dashboard-widget widget-title=\"Widget 2\"></vaadin-dashboard-widget>\n <vaadin-dashboard-section section-title=\"Section\">\n <vaadin-dashboard-widget widget-title=\"Widget in Section\"></vaadin-dashboard-widget>\n </vaadin-dashboard-section>\n</vaadin-dashboard-layout>\n```\n\n### Styling\n\nThe following custom properties are available:\n\nCustom Property | Description\n------------------------------------|-------------\n`--vaadin-dashboard-col-min-width` | minimum column width of the layout\n`--vaadin-dashboard-col-max-width` | maximum column width of the layout\n`--vaadin-dashboard-row-min-height` | minimum row height of the layout\n`--vaadin-dashboard-col-max-count` | maximum column count of the layout\n`--vaadin-dashboard-spacing` | spacing between child elements and space around its outer edges. Must be in length units (0 is not allowed, 0px is)\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|-------------\n`dense-layout` | Set when the dashboard is in dense mode.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?denseLayout",
|
|
24
|
+
"description": "Whether the dashboard layout is dense.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "vaadin-dashboard-section",
|
|
33
|
+
"description": "A section component for use with the Dashboard component\n\n```html\n<vaadin-dashboard-section section-title=\"Section Title\">\n <vaadin-dashboard-widget widget-title=\"Widget 1\"></vaadin-dashboard-widget>\n <vaadin-dashboard-widget widget-title=\"Widget 2\"></vaadin-dashboard-widget>\n</vaadin-dashboard-section>\n```\n\n#### Example\n\n```html\n<vaadin-dashboard-section section-title=\"Section title\">\n <vaadin-dashboard-widget widget-title=\"Widget 1\"></vaadin-dashboard-widget>\n <vaadin-dashboard-widget widget-title=\"Widget 2\"></vaadin-dashboard-widget>\n</vaadin-dashboard-section>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|-------------\n`header` | The header of the section\n`title` | The title of the section\n`move-button` | The move button\n`remove-button` | The remove button\n`move-backward-button` | The move backward button when in move mode\n`move-forward-button` | The move forward button when in move mode\n`move-apply-button` | The apply button when in move mode\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|-------------\n`selected` | Set when the element is selected.\n`focused` | Set when the element is focused.\n`move-mode` | Set when the element is being moved.\n`editable` | Set when the element is editable.\n`first-child` | Set when the element is the first child of the parent.\n`last-child` | Set when the element is the last child of the parent.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
34
|
+
"extension": true,
|
|
35
|
+
"attributes": [
|
|
36
|
+
{
|
|
37
|
+
"name": ".sectionTitle",
|
|
38
|
+
"description": "The title of the section",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "vaadin-dashboard-widget",
|
|
47
|
+
"description": "A Widget component for use with the Dashboard component\n\n```html\n<vaadin-dashboard-widget widget-title=\"Title\">\n <span slot=\"header-content\">Header</span>\n <div>Content</div>\n</vaadin-dashboard-widget>\n```\n\n### Customization\n\nYou can configure the item by using `slot` names.\n\nSlot name | Description\n-----------------|-------------\n`header-content` | A slot for the widget header content.\n\n#### Example\n\n```html\n<vaadin-dashboard-widget widget-title=\"Title\">\n <span slot=\"header-content\">Header</span>\n <div>Content</div>\n</vaadin-dashboard-widget>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------------------------|-------------\n`header` | The header of the widget\n`title` | The title of the widget\n`content` | The content of the widget\n`move-button` | The move button\n`remove-button` | The remove button\n`resize-button` | The resize button\n`move-backward-button` | The move backward button when in move mode\n`move-forward-button` | The move forward button when in move mode\n`move-apply-button` | The apply button when in move mode\n`resize-shrink-width-button` | The shrink width button when in resize mode\n`resize-grow-width-button` | The grow width button when in resize mode\n`resize-shrink-height-button` | The shrink height button when in resize mode\n`resize-grow-height-button` | The grow height button when in resize mode\n`resize-apply-button` | The apply button when in resize mode\n\nThe following custom properties are available:\n\nCustom Property | Description\n----------------------------------|-------------\n`--vaadin-dashboard-item-colspan` | colspan of the widget\n`--vaadin-dashboard-item-rowspan` | rowspan of the widget\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|-------------\n`selected` | Set when the element is selected.\n`focused` | Set when the element is focused.\n`move-mode` | Set when the element is being moved.\n`resize-mode` | Set when the element is being resized.\n`resizing` | Set when the element is being resized.\n`dragging` | Set when the element is being dragged.\n`editable` | Set when the element is editable.\n`first-child` | Set when the element is the first child of the parent.\n`last-child` | Set when the element is the last child of the parent.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
48
|
+
"extension": true,
|
|
49
|
+
"attributes": [
|
|
50
|
+
{
|
|
51
|
+
"name": ".widgetTitle",
|
|
52
|
+
"description": "The title of the widget.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "vaadin-dashboard",
|
|
61
|
+
"description": "A responsive, grid-based dashboard layout component\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha1/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha1/#/elements/vaadin-dashboard#property-renderer) property.\n\nThe widgets and the sections will be generated and configured based on the renderer and the items provided.\n\n```html\n<vaadin-dashboard></vaadin-dashboard>\n```\n```js\nconst dashboard = document.querySelector('vaadin-dashboard');\n\ndashboard.items = [\n { title: 'Widget 1 title', content: 'Text 1', rowspan: 2 },\n { title: 'Widget 2 title', content: 'Text 2', colspan: 2 },\n {\n title: 'Section title',\n items: [{ title: 'Widget in section title', content: 'Text 3' }]\n },\n // ... more items\n];\n\ndashboard.renderer = (root, _dashboard, { item }) => {\n const widget = root.firstElementChild || document.createElement('vaadin-dashboard-widget');\n if (!root.contains(widget)) {\n root.appendChild(widget);\n }\n widget.widgetTitle = item.title;\n widget.textContent = item.content;\n};\n```\n\n### Styling\n\nThe following custom properties are available:\n\nCustom Property | Description\n------------------------------------|-------------\n`--vaadin-dashboard-col-min-width` | minimum column width of the dashboard\n`--vaadin-dashboard-col-max-width` | maximum column width of the dashboard\n`--vaadin-dashboard-row-min-height` | minimum row height of the dashboard\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-spacing` | spacing between child elements and space around its outer edges. Must be in length units (0 is not allowed, 0px is)\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|-------------\n`editable` | Set when the dashboard is editable.\n`dense-layout` | Set when the dashboard is in dense mode.\n`item-selected`| Set when an item is selected.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
62
|
+
"extension": true,
|
|
63
|
+
"attributes": [
|
|
64
|
+
{
|
|
65
|
+
"name": "?denseLayout",
|
|
66
|
+
"description": "Whether the dashboard layout is dense.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "?editable",
|
|
73
|
+
"description": "Whether the dashboard is editable.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": ".items",
|
|
80
|
+
"description": "An array containing the items of the dashboard",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": ".renderer",
|
|
87
|
+
"description": "Custom function for rendering a widget for each dashboard item.\nPlacing something else than a widget in the wrapper is not supported.\nReceives three arguments:\n\n- `root` The container for the widget.\n- `dashboard` The reference to the `<vaadin-dashboard>` element.\n- `model` The object with the properties related with the rendered\n item, contains:\n - `model.item` The item.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".i18n",
|
|
94
|
+
"description": "The object used to localize this component.\n\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nThe object has the following structure and default values:\n```\n{\n selectSection: 'Select section for editing',\n selectWidget: 'Select widget for editing',\n remove: 'Remove',\n resize: 'Resize',\n resizeApply: 'Apply',\n resizeShrinkWidth: 'Shrink width',\n resizeGrowWidth: 'Grow width',\n resizeShrinkHeight: 'Shrink height',\n resizeGrowHeight: 'Grow height',\n move: 'Move',\n moveApply: 'Apply',\n moveForward: 'Move Forward',\n moveBackward: 'Move Backward',\n}\n```",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "@dashboard-item-move-mode-changed",
|
|
101
|
+
"description": "Fired when an item move mode changed",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "@dashboard-item-moved",
|
|
108
|
+
"description": "Fired when an item was moved",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "@dashboard-item-removed",
|
|
115
|
+
"description": "Fired when an item was removed",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "@dashboard-item-resize-mode-changed",
|
|
122
|
+
"description": "Fired when an item resize mode changed",
|
|
123
|
+
"value": {
|
|
124
|
+
"kind": "expression"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "@dashboard-item-resized",
|
|
129
|
+
"description": "Fired when an item was resized",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "expression"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "@dashboard-item-selected-changed",
|
|
136
|
+
"description": "Fired when an item selected state changed",
|
|
137
|
+
"value": {
|
|
138
|
+
"kind": "expression"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|