@vaadin/dashboard 25.4.0-alpha3 → 25.4.0-alpha5
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/custom-elements.json +13 -40
- package/package.json +10 -10
- package/src/vaadin-dashboard.js +1 -1
- package/web-types.json +3 -3
- package/web-types.lit.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "javascript-module",
|
|
7
|
-
"path": "vaadin-dashboard.js",
|
|
7
|
+
"path": "vaadin-dashboard-layout.js",
|
|
8
8
|
"declarations": [],
|
|
9
9
|
"exports": [
|
|
10
10
|
{
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"name": "*",
|
|
13
13
|
"declaration": {
|
|
14
14
|
"name": "*",
|
|
15
|
-
"module": "src/vaadin-dashboard.js"
|
|
15
|
+
"module": "src/vaadin-dashboard-layout.js"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"kind": "javascript-module",
|
|
22
|
-
"path": "vaadin-dashboard-
|
|
22
|
+
"path": "vaadin-dashboard-section.js",
|
|
23
23
|
"declarations": [],
|
|
24
24
|
"exports": [
|
|
25
25
|
{
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"name": "*",
|
|
28
28
|
"declaration": {
|
|
29
29
|
"name": "*",
|
|
30
|
-
"module": "src/vaadin-dashboard-
|
|
30
|
+
"module": "src/vaadin-dashboard-section.js"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"kind": "javascript-module",
|
|
37
|
-
"path": "vaadin-dashboard-
|
|
37
|
+
"path": "vaadin-dashboard-widget.js",
|
|
38
38
|
"declarations": [],
|
|
39
39
|
"exports": [
|
|
40
40
|
{
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"name": "*",
|
|
43
43
|
"declaration": {
|
|
44
44
|
"name": "*",
|
|
45
|
-
"module": "src/vaadin-dashboard-
|
|
45
|
+
"module": "src/vaadin-dashboard-widget.js"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"kind": "javascript-module",
|
|
52
|
-
"path": "vaadin-dashboard
|
|
52
|
+
"path": "vaadin-dashboard.js",
|
|
53
53
|
"declarations": [],
|
|
54
54
|
"exports": [
|
|
55
55
|
{
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"name": "*",
|
|
58
58
|
"declaration": {
|
|
59
59
|
"name": "*",
|
|
60
|
-
"module": "src/vaadin-dashboard
|
|
60
|
+
"module": "src/vaadin-dashboard.js"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
]
|
|
@@ -755,16 +755,11 @@
|
|
|
755
755
|
{
|
|
756
756
|
"kind": "field",
|
|
757
757
|
"name": "i18n",
|
|
758
|
-
"
|
|
758
|
+
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following structure and default values:\n```js\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```",
|
|
759
759
|
"type": {
|
|
760
|
-
"text": "
|
|
760
|
+
"text": "DashboardI18n | undefined"
|
|
761
761
|
},
|
|
762
|
-
"
|
|
763
|
-
"attribute": "i18n",
|
|
764
|
-
"inheritedFrom": {
|
|
765
|
-
"name": "I18nMixin",
|
|
766
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
767
|
-
}
|
|
762
|
+
"privacy": "public"
|
|
768
763
|
},
|
|
769
764
|
{
|
|
770
765
|
"kind": "field",
|
|
@@ -773,8 +768,7 @@
|
|
|
773
768
|
"type": {
|
|
774
769
|
"text": "!Array<!DashboardItem> | null | undefined"
|
|
775
770
|
},
|
|
776
|
-
"description": "An array containing the items of the dashboard"
|
|
777
|
-
"attribute": "items"
|
|
771
|
+
"description": "An array containing the items of the dashboard"
|
|
778
772
|
},
|
|
779
773
|
{
|
|
780
774
|
"kind": "field",
|
|
@@ -783,8 +777,7 @@
|
|
|
783
777
|
"type": {
|
|
784
778
|
"text": "DashboardRenderer | null | undefined"
|
|
785
779
|
},
|
|
786
|
-
"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."
|
|
787
|
-
"attribute": "renderer"
|
|
780
|
+
"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."
|
|
788
781
|
},
|
|
789
782
|
{
|
|
790
783
|
"kind": "field",
|
|
@@ -873,26 +866,6 @@
|
|
|
873
866
|
"description": "Whether the dashboard is editable.",
|
|
874
867
|
"fieldName": "editable"
|
|
875
868
|
},
|
|
876
|
-
{
|
|
877
|
-
"name": "i18n",
|
|
878
|
-
"type": {
|
|
879
|
-
"text": "Object | undefined"
|
|
880
|
-
},
|
|
881
|
-
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
882
|
-
"fieldName": "i18n",
|
|
883
|
-
"inheritedFrom": {
|
|
884
|
-
"name": "I18nMixin",
|
|
885
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
886
|
-
}
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
"name": "renderer",
|
|
890
|
-
"type": {
|
|
891
|
-
"text": "DashboardRenderer | null | undefined"
|
|
892
|
-
},
|
|
893
|
-
"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.",
|
|
894
|
-
"fieldName": "renderer"
|
|
895
|
-
},
|
|
896
869
|
{
|
|
897
870
|
"name": "root-heading-level",
|
|
898
871
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/dashboard",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
41
|
-
"@vaadin/button": "25.4.0-
|
|
42
|
-
"@vaadin/component-base": "25.4.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.4.0-alpha5",
|
|
41
|
+
"@vaadin/button": "25.4.0-alpha5",
|
|
42
|
+
"@vaadin/component-base": "25.4.0-alpha5",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha5",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/aura": "25.4.0-
|
|
48
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
49
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
47
|
+
"@vaadin/aura": "25.4.0-alpha5",
|
|
48
|
+
"@vaadin/chai-plugins": "25.4.0-alpha5",
|
|
49
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha5",
|
|
50
50
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha5",
|
|
52
52
|
"sinon": "^22.0.0"
|
|
53
53
|
},
|
|
54
54
|
"cvdlName": "vaadin-dashboard",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"web-types.json",
|
|
58
58
|
"web-types.lit.json"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "65e9c9e49c0a723b08ee91b9aae8b901e91a3597"
|
|
61
61
|
}
|
package/src/vaadin-dashboard.js
CHANGED
|
@@ -433,7 +433,7 @@ class Dashboard extends DashboardLayoutMixin(
|
|
|
433
433
|
wrapper.editable = this.editable;
|
|
434
434
|
wrapper.dragging = this.__widgetReorderController.draggedItem === item;
|
|
435
435
|
wrapper['first-child'] = item === getItemsArrayOfItem(item, this.items)[0];
|
|
436
|
-
wrapper['last-child'] = item === getItemsArrayOfItem(item, this.items).
|
|
436
|
+
wrapper['last-child'] = item === getItemsArrayOfItem(item, this.items).at(-1);
|
|
437
437
|
wrapper.i18n = this.__effectiveI18n;
|
|
438
438
|
}
|
|
439
439
|
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/dashboard",
|
|
4
|
-
"version": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"name": "vaadin-dashboard",
|
|
143
|
-
"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/25.4.0-
|
|
143
|
+
"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/25.4.0-alpha5/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha5/#/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-row-height` | fixed row height of the dashboard. Must be in length units. Overrides `--vaadin-dashboard-row-min-height` and prevents rows from growing to fit content\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-gap` | gap between child elements. Must be in length units (0 is not allowed, 0px is)\n`--vaadin-dashboard-padding` | space around the dashboard's 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.",
|
|
144
144
|
"attributes": [
|
|
145
145
|
{
|
|
146
146
|
"name": "dense-layout",
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following structure and default values:\n```js\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```",
|
|
205
205
|
"value": {
|
|
206
206
|
"type": [
|
|
207
|
-
"
|
|
207
|
+
"DashboardI18n",
|
|
208
208
|
"undefined"
|
|
209
209
|
]
|
|
210
210
|
}
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/dashboard",
|
|
4
|
-
"version": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"name": "vaadin-dashboard",
|
|
68
|
-
"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/25.4.0-
|
|
68
|
+
"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/25.4.0-alpha5/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha5/#/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-row-height` | fixed row height of the dashboard. Must be in length units. Overrides `--vaadin-dashboard-row-min-height` and prevents rows from growing to fit content\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-gap` | gap between child elements. Must be in length units (0 is not allowed, 0px is)\n`--vaadin-dashboard-padding` | space around the dashboard's 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.",
|
|
69
69
|
"extension": true,
|
|
70
70
|
"attributes": [
|
|
71
71
|
{
|