@vaadin/crud 23.1.0-beta1 → 23.1.0-beta4
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/package.json +13 -12
- package/src/vaadin-crud.js +8 -4
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/crud",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-beta4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "vaadin-crud",
|
|
8
8
|
"license": "https://raw.githubusercontent.com/vaadin/web-components/master/packages/crud/LICENSE",
|
|
9
|
+
"cvdlName": "vaadin-crud",
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "https://github.com/vaadin/web-components.git",
|
|
@@ -35,22 +36,22 @@
|
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
38
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/button": "23.1.0-
|
|
39
|
-
"@vaadin/component-base": "23.1.0-
|
|
40
|
-
"@vaadin/confirm-dialog": "23.1.0-
|
|
41
|
-
"@vaadin/dialog": "23.1.0-
|
|
42
|
-
"@vaadin/form-layout": "23.1.0-
|
|
43
|
-
"@vaadin/grid": "23.1.0-
|
|
44
|
-
"@vaadin/text-field": "23.1.0-
|
|
39
|
+
"@vaadin/button": "23.1.0-beta4",
|
|
40
|
+
"@vaadin/component-base": "23.1.0-beta4",
|
|
41
|
+
"@vaadin/confirm-dialog": "23.1.0-beta4",
|
|
42
|
+
"@vaadin/dialog": "23.1.0-beta4",
|
|
43
|
+
"@vaadin/form-layout": "23.1.0-beta4",
|
|
44
|
+
"@vaadin/grid": "23.1.0-beta4",
|
|
45
|
+
"@vaadin/text-field": "23.1.0-beta4",
|
|
45
46
|
"@vaadin/vaadin-license-checker": "^2.1.0",
|
|
46
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
47
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
48
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-beta4",
|
|
48
|
+
"@vaadin/vaadin-material-styles": "23.1.0-beta4",
|
|
49
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-beta4"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@esm-bundle/chai": "^4.3.4",
|
|
52
53
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
53
54
|
"sinon": "^13.0.2"
|
|
54
55
|
},
|
|
55
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "06e283473964ecb3085aacf3eddb5333d052a045"
|
|
56
57
|
}
|
package/src/vaadin-crud.js
CHANGED
|
@@ -310,6 +310,10 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
310
310
|
return 'vaadin-crud';
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
static get cvdlName() {
|
|
314
|
+
return 'vaadin-crud';
|
|
315
|
+
}
|
|
316
|
+
|
|
313
317
|
static get properties() {
|
|
314
318
|
return {
|
|
315
319
|
/**
|
|
@@ -541,7 +545,7 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
541
545
|
*/
|
|
542
546
|
i18n: {
|
|
543
547
|
type: Object,
|
|
544
|
-
value
|
|
548
|
+
value() {
|
|
545
549
|
return {
|
|
546
550
|
newItem: 'New item',
|
|
547
551
|
editItem: 'Edit item',
|
|
@@ -1061,7 +1065,7 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
1061
1065
|
) {
|
|
1062
1066
|
this.$.confirmCancel.opened = true;
|
|
1063
1067
|
const listenOnce = (event) => {
|
|
1064
|
-
event.preventDefault(); //
|
|
1068
|
+
event.preventDefault(); // Prevent editor to get closed
|
|
1065
1069
|
if (item || keepOpened) {
|
|
1066
1070
|
this.__edit(item);
|
|
1067
1071
|
this.__clearItemAndKeepEditorOpened(item, keepOpened);
|
|
@@ -1198,7 +1202,7 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
1198
1202
|
this.__isDirty = false;
|
|
1199
1203
|
this.__isNew = !item;
|
|
1200
1204
|
const evt = this.dispatchEvent(
|
|
1201
|
-
new CustomEvent(this.__isNew ? 'new' : 'edit', { detail: { item
|
|
1205
|
+
new CustomEvent(this.__isNew ? 'new' : 'edit', { detail: { item }, cancelable: true }),
|
|
1202
1206
|
);
|
|
1203
1207
|
if (evt) {
|
|
1204
1208
|
this.editedItem = item || {};
|
|
@@ -1220,7 +1224,7 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
1220
1224
|
this.__set(path, e.value, item);
|
|
1221
1225
|
}
|
|
1222
1226
|
});
|
|
1223
|
-
const evt = this.dispatchEvent(new CustomEvent('save', { detail: { item
|
|
1227
|
+
const evt = this.dispatchEvent(new CustomEvent('save', { detail: { item }, cancelable: true }));
|
|
1224
1228
|
if (evt) {
|
|
1225
1229
|
if (this.__isNew && !this.dataProvider) {
|
|
1226
1230
|
if (!this.items) {
|