@vaadin/crud 23.2.0-dev.8a7678b70 → 23.3.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/README.md +5 -5
- package/package.json +21 -16
- package/src/vaadin-crud-edit-column.d.ts +1 -1
- package/src/vaadin-crud-edit.d.ts +1 -1
- package/src/vaadin-crud-edit.js +1 -0
- package/src/vaadin-crud-form.d.ts +1 -1
- package/src/vaadin-crud-form.js +4 -1
- package/src/vaadin-crud-grid.d.ts +1 -1
- package/src/vaadin-crud-grid.js +5 -2
- package/src/vaadin-crud-include-mixin.d.ts +5 -5
- package/src/vaadin-crud.d.ts +7 -7
- package/src/vaadin-crud.js +6 -15
- package/theme/lumo/vaadin-crud-styles.js +0 -4
- package/web-types.json +594 -0
- package/web-types.lit.json +300 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A web component for displaying, editing, creating, and deleting items from a dat
|
|
|
4
4
|
|
|
5
5
|
> ℹ️ A commercial Vaadin [subscription](https://vaadin.com/pricing) is required to use CRUD in your project.
|
|
6
6
|
|
|
7
|
-
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/
|
|
7
|
+
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/crud)
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@vaadin/crud)
|
|
10
10
|
[](https://discord.gg/PHmkCKC)
|
|
@@ -13,7 +13,7 @@ A web component for displaying, editing, creating, and deleting items from a dat
|
|
|
13
13
|
<vaadin-crud items='[{"name": "Juan", "surname": "Garcia"}]'></vaadin-crud>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/crud/screenshot.gif" width="702" alt="Screenshot of vaadin-crud">](https://vaadin.com/docs/latest/
|
|
16
|
+
[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/crud/screenshot.gif" width="702" alt="Screenshot of vaadin-crud">](https://vaadin.com/docs/latest/components/crud)
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@ import '@vaadin/crud';
|
|
|
31
31
|
|
|
32
32
|
## Themes
|
|
33
33
|
|
|
34
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/
|
|
34
|
+
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
35
35
|
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/crud/vaadin-crud.js) of the package uses the Lumo theme.
|
|
36
36
|
|
|
37
37
|
To use the Material theme, import the component from the `theme/material` folder:
|
|
@@ -54,11 +54,11 @@ import '@vaadin/crud/src/vaadin-crud.js';
|
|
|
54
54
|
|
|
55
55
|
## Contributing
|
|
56
56
|
|
|
57
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/
|
|
57
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
58
58
|
|
|
59
59
|
## License
|
|
60
60
|
|
|
61
61
|
Commercial Vaadin Developer License 4.0 (CVDLv4). For license terms, see LICENSE.
|
|
62
62
|
|
|
63
63
|
Vaadin collects usage statistics at development time to improve this product.
|
|
64
|
-
For
|
|
64
|
+
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/crud",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.3.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "vaadin-crud",
|
|
8
|
-
"license": "
|
|
9
|
-
"cvdlName": "vaadin-crud",
|
|
8
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
10
9
|
"repository": {
|
|
11
10
|
"type": "git",
|
|
12
11
|
"url": "https://github.com/vaadin/web-components.git",
|
|
@@ -24,7 +23,9 @@
|
|
|
24
23
|
"src",
|
|
25
24
|
"theme",
|
|
26
25
|
"vaadin-*.d.ts",
|
|
27
|
-
"vaadin-*.js"
|
|
26
|
+
"vaadin-*.js",
|
|
27
|
+
"web-types.json",
|
|
28
|
+
"web-types.lit.json"
|
|
28
29
|
],
|
|
29
30
|
"keywords": [
|
|
30
31
|
"Vaadin",
|
|
@@ -36,22 +37,26 @@
|
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
39
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/button": "23.
|
|
40
|
-
"@vaadin/component-base": "23.
|
|
41
|
-
"@vaadin/confirm-dialog": "23.
|
|
42
|
-
"@vaadin/dialog": "23.
|
|
43
|
-
"@vaadin/form-layout": "23.
|
|
44
|
-
"@vaadin/grid": "23.
|
|
45
|
-
"@vaadin/text-field": "23.
|
|
46
|
-
"@vaadin/vaadin-
|
|
47
|
-
"@vaadin/vaadin-
|
|
48
|
-
"@vaadin/vaadin-
|
|
49
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-dev.8a7678b70"
|
|
40
|
+
"@vaadin/button": "23.3.0-alpha1",
|
|
41
|
+
"@vaadin/component-base": "23.3.0-alpha1",
|
|
42
|
+
"@vaadin/confirm-dialog": "23.3.0-alpha1",
|
|
43
|
+
"@vaadin/dialog": "23.3.0-alpha1",
|
|
44
|
+
"@vaadin/form-layout": "23.3.0-alpha1",
|
|
45
|
+
"@vaadin/grid": "23.3.0-alpha1",
|
|
46
|
+
"@vaadin/text-field": "23.3.0-alpha1",
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha1",
|
|
48
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha1",
|
|
49
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@esm-bundle/chai": "^4.3.4",
|
|
53
53
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
54
54
|
"sinon": "^13.0.2"
|
|
55
55
|
},
|
|
56
|
-
"
|
|
56
|
+
"cvdlName": "vaadin-crud",
|
|
57
|
+
"web-types": [
|
|
58
|
+
"web-types.json",
|
|
59
|
+
"web-types.lit.json"
|
|
60
|
+
],
|
|
61
|
+
"gitHead": "beabc527d4b1274eb798ff701d406fed45cfe638"
|
|
57
62
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2018 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
|
|
5
5
|
*/
|
|
6
6
|
import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2018 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
|
|
5
5
|
*/
|
|
6
6
|
import { Button } from '@vaadin/button/src/vaadin-button.js';
|
|
7
7
|
|
package/src/vaadin-crud-edit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2018 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
|
|
5
5
|
*/
|
|
6
6
|
import { FormLayout } from '@vaadin/form-layout/src/vaadin-form-layout.js';
|
|
7
7
|
import { IncludedMixin } from './vaadin-crud-include-mixin.js';
|
package/src/vaadin-crud-form.js
CHANGED
|
@@ -98,7 +98,10 @@ class CrudForm extends IncludedMixin(FormLayout) {
|
|
|
98
98
|
path
|
|
99
99
|
.split('.')
|
|
100
100
|
.slice(0, -1)
|
|
101
|
-
.reduce((o, p) =>
|
|
101
|
+
.reduce((o, p) => {
|
|
102
|
+
o[p] = o[p] || {};
|
|
103
|
+
return o[p];
|
|
104
|
+
}, obj);
|
|
102
105
|
this.set(path, val, obj);
|
|
103
106
|
}
|
|
104
107
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2018 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
|
|
5
5
|
*/
|
|
6
6
|
import { Grid } from '@vaadin/grid/src/vaadin-grid.js';
|
|
7
7
|
import { IncludedMixin } from './vaadin-crud-include-mixin.js';
|
package/src/vaadin-crud-grid.js
CHANGED
|
@@ -222,7 +222,7 @@ class CrudGrid extends IncludedMixin(Grid) {
|
|
|
222
222
|
* @param {string} path The property path from the root item to the object.
|
|
223
223
|
* @param {number} depth The depth of the object in the object hierarchy.
|
|
224
224
|
* @private
|
|
225
|
-
|
|
225
|
+
*/
|
|
226
226
|
__createColumns(parent, object, path, depth) {
|
|
227
227
|
if (object && typeof object === 'object') {
|
|
228
228
|
// Iterate over the object properties
|
|
@@ -282,7 +282,10 @@ class CrudGrid extends IncludedMixin(Grid) {
|
|
|
282
282
|
path
|
|
283
283
|
.split('.')
|
|
284
284
|
.slice(0, -1)
|
|
285
|
-
.reduce((o, p) =>
|
|
285
|
+
.reduce((o, p) => {
|
|
286
|
+
o[p] = o[p] || {};
|
|
287
|
+
return o[p];
|
|
288
|
+
}, obj);
|
|
286
289
|
this.set(path, val, obj);
|
|
287
290
|
}
|
|
288
291
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2018 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
|
|
5
5
|
*/
|
|
6
|
-
import { Constructor } from '@open-wc/dedupe-mixin';
|
|
6
|
+
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
7
|
|
|
8
|
-
export declare function IncludedMixin<T extends Constructor<HTMLElement>>(base: T):
|
|
8
|
+
export declare function IncludedMixin<T extends Constructor<HTMLElement>>(base: T): Constructor<IncludedMixinClass> & T;
|
|
9
9
|
|
|
10
10
|
export declare class IncludedMixinClass {
|
|
11
11
|
/**
|
|
@@ -15,12 +15,12 @@ export declare class IncludedMixinClass {
|
|
|
15
15
|
*
|
|
16
16
|
* Default is to exclude any private property.
|
|
17
17
|
*/
|
|
18
|
-
exclude:
|
|
18
|
+
exclude: RegExp | string | null;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* A list of item properties that should be mapped to form fields.
|
|
22
22
|
*
|
|
23
23
|
* When it is defined [`exclude`](#/elements/vaadin-crud-form#property-exclude) is ignored.
|
|
24
24
|
*/
|
|
25
|
-
include: string | string
|
|
25
|
+
include: string[] | string | undefined;
|
|
26
26
|
}
|
package/src/vaadin-crud.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2018 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
|
|
5
5
|
*/
|
|
6
6
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
|
-
import { GridFilterDefinition, GridSorterDefinition } from '@vaadin/grid/src/vaadin-grid.js';
|
|
8
|
+
import type { GridFilterDefinition, GridSorterDefinition } from '@vaadin/grid/src/vaadin-grid.js';
|
|
9
9
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
10
|
|
|
11
11
|
export type CrudDataProviderCallback<T> = (items: T[], size?: number) => void;
|
|
@@ -19,7 +19,7 @@ export type CrudDataProviderParams = {
|
|
|
19
19
|
|
|
20
20
|
export type CrudDataProvider<T> = (params: CrudDataProviderParams, callback: CrudDataProviderCallback<T>) => void;
|
|
21
21
|
|
|
22
|
-
export type CrudEditorPosition = '' | '
|
|
22
|
+
export type CrudEditorPosition = '' | 'aside' | 'bottom';
|
|
23
23
|
|
|
24
24
|
export interface CrudI18n {
|
|
25
25
|
newItem: string;
|
|
@@ -113,7 +113,7 @@ export type CrudCustomEventMap<T> = {
|
|
|
113
113
|
save: CrudSaveEvent<T>;
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
export type CrudEventMap<T> =
|
|
116
|
+
export type CrudEventMap<T> = CrudCustomEventMap<T> & HTMLElementEventMap;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
* `<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.
|
|
@@ -226,7 +226,7 @@ export type CrudEventMap<T> = HTMLElementEventMap & CrudCustomEventMap<T>;
|
|
|
226
226
|
* --vaadin-crud-editor-max-height | max height of editor when opened on the bottom | 40%
|
|
227
227
|
* --vaadin-crud-editor-max-width | max width of editor when opened on the side | 40%
|
|
228
228
|
*
|
|
229
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
229
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
230
230
|
*
|
|
231
231
|
* @fires {CustomEvent} editor-opened-changed - Fired when the `editorOpened` property changes.
|
|
232
232
|
* @fires {CustomEvent} edited-item-changed - Fired when `editedItem` property changes.
|
|
@@ -383,13 +383,13 @@ declare class Crud<Item> extends ControllerMixin(ElementMixin(ThemableMixin(HTML
|
|
|
383
383
|
addEventListener<K extends keyof CrudEventMap<Item>>(
|
|
384
384
|
type: K,
|
|
385
385
|
listener: (this: Crud<Item>, ev: CrudEventMap<Item>[K]) => void,
|
|
386
|
-
options?:
|
|
386
|
+
options?: AddEventListenerOptions | boolean,
|
|
387
387
|
): void;
|
|
388
388
|
|
|
389
389
|
removeEventListener<K extends keyof CrudEventMap<Item>>(
|
|
390
390
|
type: K,
|
|
391
391
|
listener: (this: Crud<Item>, ev: CrudEventMap<Item>[K]) => void,
|
|
392
|
-
options?:
|
|
392
|
+
options?: EventListenerOptions | boolean,
|
|
393
393
|
): void;
|
|
394
394
|
}
|
|
395
395
|
|
package/src/vaadin-crud.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import '@vaadin/button/src/vaadin-button.js';
|
|
7
7
|
import '@vaadin/dialog/src/vaadin-dialog.js';
|
|
8
8
|
import '@vaadin/confirm-dialog/src/vaadin-confirm-dialog.js';
|
|
9
|
-
import '@vaadin/vaadin-license-checker/vaadin-license-checker.js';
|
|
10
9
|
import './vaadin-crud-dialog.js';
|
|
11
10
|
import './vaadin-crud-grid.js';
|
|
12
11
|
import './vaadin-crud-form.js';
|
|
@@ -130,7 +129,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
130
129
|
* --vaadin-crud-editor-max-height | max height of editor when opened on the bottom | 40%
|
|
131
130
|
* --vaadin-crud-editor-max-width | max width of editor when opened on the side | 40%
|
|
132
131
|
*
|
|
133
|
-
* See [Styling Components](https://vaadin.com/docs/latest/
|
|
132
|
+
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
134
133
|
*
|
|
135
134
|
* @fires {CustomEvent} editor-opened-changed - Fired when the `editorOpened` property changes.
|
|
136
135
|
* @fires {CustomEvent} edited-item-changed - Fired when `editedItem` property changes.
|
|
@@ -615,17 +614,6 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
615
614
|
];
|
|
616
615
|
}
|
|
617
616
|
|
|
618
|
-
/** @protected */
|
|
619
|
-
static _finalizeClass() {
|
|
620
|
-
super._finalizeClass();
|
|
621
|
-
|
|
622
|
-
const devModeCallback = window.Vaadin.developmentModeCallback;
|
|
623
|
-
const licenseChecker = devModeCallback && devModeCallback['vaadin-license-checker'];
|
|
624
|
-
if (typeof licenseChecker === 'function') {
|
|
625
|
-
licenseChecker(Crud);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
617
|
/** @private */
|
|
630
618
|
static _isValidEditorPosition(editorPosition) {
|
|
631
619
|
return ['bottom', 'aside'].includes(editorPosition);
|
|
@@ -1183,7 +1171,7 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
1183
1171
|
/** @private */
|
|
1184
1172
|
__new(event) {
|
|
1185
1173
|
// This allows listening to parent element and fire only when clicking on default or custom new-button.
|
|
1186
|
-
if (event.composedPath().
|
|
1174
|
+
if (event.composedPath().some((e) => e.nodeType === 1 && e.hasAttribute('new-button'))) {
|
|
1187
1175
|
this.__confirmBeforeChangingEditedItem(null, true);
|
|
1188
1176
|
}
|
|
1189
1177
|
}
|
|
@@ -1284,7 +1272,10 @@ class Crud extends SlotMixin(ControllerMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
1284
1272
|
path
|
|
1285
1273
|
.split('.')
|
|
1286
1274
|
.slice(0, -1)
|
|
1287
|
-
.reduce((o, p) =>
|
|
1275
|
+
.reduce((o, p) => {
|
|
1276
|
+
o[p] = o[p] || {};
|
|
1277
|
+
return o[p];
|
|
1278
|
+
}, obj);
|
|
1288
1279
|
this.set(path, val, obj);
|
|
1289
1280
|
}
|
|
1290
1281
|
}
|
|
@@ -117,10 +117,6 @@ registerStyles(
|
|
|
117
117
|
:host([dir='rtl']:not([theme~='no-border'])[editor-position='aside']) [part='editor']:not([hidden]) {
|
|
118
118
|
border-right: 0;
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
vaadin-grid-cell-content {
|
|
122
|
-
text-overflow: ellipsis;
|
|
123
|
-
}
|
|
124
120
|
`,
|
|
125
121
|
],
|
|
126
122
|
{ moduleId: 'lumo-crud' },
|
package/web-types.json
ADDED
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/crud",
|
|
4
|
+
"version": "23.3.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "vaadin-crud-edit",
|
|
11
|
+
"description": "`<vaadin-crud-edit>` is a helper element for `<vaadin-grid-column>` that provides\nan easily themable button that fires an `edit` event with the row item as detail\nwhen clicked.\n\nTypical usage is in a `<vaadin-grid-column>` of a custom `<vaadin-grid>` inside\na `<vaadin-crud>` to enable editing.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "theme",
|
|
15
|
+
"description": "The theme variants to apply to the component.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"string",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"js": {
|
|
26
|
+
"properties": [],
|
|
27
|
+
"events": [
|
|
28
|
+
{
|
|
29
|
+
"name": "edit",
|
|
30
|
+
"description": "Fired when user on the icon."
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "vaadin-crud-edit-column",
|
|
37
|
+
"description": "`<vaadin-crud-edit-column>` is a helper element for the `<vaadin-grid>`\nthat provides a clickable and themable edit icon.\n\nTypical usage is in a custom `<vaadin-grid>` inside a `<vaadin-crud>`.\n\n#### Example:\n```html\n<vaadin-grid items=\"[[items]]\">\n <vaadin-crud-edit-column></vaadin-crud-edit-column>\n\n <vaadin-grid-column>\n ...\n```",
|
|
38
|
+
"attributes": [
|
|
39
|
+
{
|
|
40
|
+
"name": "resizable",
|
|
41
|
+
"description": "When set to true, the column is user-resizable.",
|
|
42
|
+
"value": {
|
|
43
|
+
"type": [
|
|
44
|
+
"boolean",
|
|
45
|
+
"null",
|
|
46
|
+
"undefined"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "frozen",
|
|
52
|
+
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
53
|
+
"value": {
|
|
54
|
+
"type": [
|
|
55
|
+
"boolean"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "frozen-to-end",
|
|
61
|
+
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
62
|
+
"value": {
|
|
63
|
+
"type": [
|
|
64
|
+
"boolean"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "hidden",
|
|
70
|
+
"description": "When set to true, the cells for this column are hidden.",
|
|
71
|
+
"value": {
|
|
72
|
+
"type": [
|
|
73
|
+
"boolean",
|
|
74
|
+
"null",
|
|
75
|
+
"undefined"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "header",
|
|
81
|
+
"description": "Text content to display in the header cell of the column.",
|
|
82
|
+
"value": {
|
|
83
|
+
"type": [
|
|
84
|
+
"string",
|
|
85
|
+
"null",
|
|
86
|
+
"undefined"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "text-align",
|
|
92
|
+
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
93
|
+
"value": {
|
|
94
|
+
"type": [
|
|
95
|
+
"GridColumnTextAlign",
|
|
96
|
+
"null",
|
|
97
|
+
"undefined"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "width",
|
|
103
|
+
"description": "Width of the cells for this column.",
|
|
104
|
+
"value": {
|
|
105
|
+
"type": [
|
|
106
|
+
"string",
|
|
107
|
+
"null",
|
|
108
|
+
"undefined"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "flex-grow",
|
|
114
|
+
"description": "Flex grow ratio for the cell widths. When set to 0, cell width is fixed.",
|
|
115
|
+
"value": {
|
|
116
|
+
"type": [
|
|
117
|
+
"number"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "path",
|
|
123
|
+
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
124
|
+
"value": {
|
|
125
|
+
"type": [
|
|
126
|
+
"string",
|
|
127
|
+
"null",
|
|
128
|
+
"undefined"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "auto-width",
|
|
134
|
+
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
135
|
+
"value": {
|
|
136
|
+
"type": [
|
|
137
|
+
"boolean"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "aria-label",
|
|
143
|
+
"description": "The arial-label for the edit button",
|
|
144
|
+
"value": {
|
|
145
|
+
"type": [
|
|
146
|
+
"string",
|
|
147
|
+
"null",
|
|
148
|
+
"undefined"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "theme",
|
|
154
|
+
"description": "The theme variants to apply to the component.",
|
|
155
|
+
"value": {
|
|
156
|
+
"type": [
|
|
157
|
+
"string",
|
|
158
|
+
"null",
|
|
159
|
+
"undefined"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"js": {
|
|
165
|
+
"properties": [
|
|
166
|
+
{
|
|
167
|
+
"name": "resizable",
|
|
168
|
+
"description": "When set to true, the column is user-resizable.",
|
|
169
|
+
"value": {
|
|
170
|
+
"type": [
|
|
171
|
+
"boolean",
|
|
172
|
+
"null",
|
|
173
|
+
"undefined"
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "frozen",
|
|
179
|
+
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
180
|
+
"value": {
|
|
181
|
+
"type": [
|
|
182
|
+
"boolean"
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "frozenToEnd",
|
|
188
|
+
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
189
|
+
"value": {
|
|
190
|
+
"type": [
|
|
191
|
+
"boolean"
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "hidden",
|
|
197
|
+
"description": "When set to true, the cells for this column are hidden.",
|
|
198
|
+
"value": {
|
|
199
|
+
"type": [
|
|
200
|
+
"boolean",
|
|
201
|
+
"null",
|
|
202
|
+
"undefined"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "header",
|
|
208
|
+
"description": "Text content to display in the header cell of the column.",
|
|
209
|
+
"value": {
|
|
210
|
+
"type": [
|
|
211
|
+
"string",
|
|
212
|
+
"null",
|
|
213
|
+
"undefined"
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "textAlign",
|
|
219
|
+
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
220
|
+
"value": {
|
|
221
|
+
"type": [
|
|
222
|
+
"GridColumnTextAlign",
|
|
223
|
+
"null",
|
|
224
|
+
"undefined"
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "headerRenderer",
|
|
230
|
+
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
231
|
+
"value": {
|
|
232
|
+
"type": [
|
|
233
|
+
"GridHeaderFooterRenderer",
|
|
234
|
+
"null",
|
|
235
|
+
"undefined"
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "footerRenderer",
|
|
241
|
+
"description": "Custom function for rendering the footer content.\nReceives two arguments:\n\n- `root` The footer cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
242
|
+
"value": {
|
|
243
|
+
"type": [
|
|
244
|
+
"GridHeaderFooterRenderer",
|
|
245
|
+
"null",
|
|
246
|
+
"undefined"
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "renderer",
|
|
252
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
253
|
+
"value": {
|
|
254
|
+
"type": [
|
|
255
|
+
"GridBodyRenderer",
|
|
256
|
+
"null",
|
|
257
|
+
"undefined"
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "path",
|
|
263
|
+
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
264
|
+
"value": {
|
|
265
|
+
"type": [
|
|
266
|
+
"string",
|
|
267
|
+
"null",
|
|
268
|
+
"undefined"
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "autoWidth",
|
|
274
|
+
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
275
|
+
"value": {
|
|
276
|
+
"type": [
|
|
277
|
+
"boolean"
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "ariaLabel",
|
|
283
|
+
"description": "The arial-label for the edit button",
|
|
284
|
+
"value": {
|
|
285
|
+
"type": [
|
|
286
|
+
"string",
|
|
287
|
+
"null",
|
|
288
|
+
"undefined"
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"events": []
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "vaadin-crud",
|
|
298
|
+
"description": "`<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-items) property.\n\nA grid and an editor will be automatically generated and configured based on the data structure provided.\n\n#### Example:\n```html\n<vaadin-crud items='[{\"name\": \"John\", \"surname\": \"Lennon\", \"role\": \"singer\"},\n {\"name\": \"Ringo\", \"surname\": \"Starr\", \"role\": \"drums\"}]'></vaadin-crud>\n```\n\n### Data Provider Function\n\nOtherwise, you can provide a [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-dataProvider) function.\n#### Example:\n```html\n<vaadin-crud></vaadin-crud>\n```\n```js\nconst crud = document.querySelector('vaadin-crud');\nconst users = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'}, ...];\ncrud.dataProvider = function(params, callback) {\n const chunk = users.slice(params.page * params.pageSize, params.page * params.pageSize + params.pageSize);\n callback(chunk, people.length);\n};\n```\n\nNOTE: The auto-generated editor only supports string types. If you need to handle special cases\ncustomizing the editor is discussed below.\n\n### Customization\n\nAlternatively you can fully configure the component by using `slot` names.\n\nSlot name | Description\n----------------|----------------\n`grid` | To replace the auto-generated grid with a custom one.\n`form` | To replace the auto-generated form.\n`toolbar` | To replace the toolbar content. Add an element with the attribute `new-button` for the new item action.\n\n#### Example:\n\n```html\n<vaadin-crud\n id=\"crud\"\n items='[{\"name\": \"John\", \"surname\": \"Lennon\", \"role\": \"singer\"},\n {\"name\": \"Ringo\", \"surname\": \"Starr\", \"role\": \"drums\"}]'\n>\n <vaadin-grid slot=\"grid\">\n <vaadin-crud-edit-column></vaadin-crud-edit-column>\n <vaadin-grid-column id=\"column1\"></vaadin-grid-column>\n <vaadin-grid-column id=\"column2\"></vaadin-grid-column>\n </vaadin-grid>\n\n <vaadin-form-layout slot=\"form\">\n <vaadin-text-field label=\"First\" path=\"name\"></vaadin-text-field>\n <vaadin-text-field label=\"Surname\" path=\"surname\"></vaadin-text-field>\n </vaadin-form-layout>\n\n <div slot=\"toolbar\">\n Total singers: [[size]]\n <button new-button>New singer</button>\n </div>\n</vaadin-crud>\n```\n```js\nconst crud = document.querySelector('#crud');\n\nconst column1 = document.querySelector('#column1');\ncolumn1.headerRenderer = (root, column) => {\n root.textContent = 'Name';\n};\ncolumn1.renderer = (root, column, model) => {\n root.textContent = model.item.name;\n};\n\nconst column2 = document.querySelector('#column2');\ncolumn2.headerRenderer = (root, column) => {\n root.textContent = 'Surname';\n};\ncolumn2.renderer = (root, column, model) => {\n root.textContent = model.item.surname;\n};\n```\n\n### Helpers\n\nThe following elements are used to auto-configure the grid and the editor\n- [`<vaadin-crud-edit-column>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud-edit-column)\n- `<vaadin-crud-grid>` - can be replaced with custom [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-grid)\n- `<vaadin-crud-form>` - can be replaced with custom [`<vaadin-form-layout>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-form-layout)\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`toolbar` | Toolbar container at the bottom. By default it contains the the `new` button\n\nThe following custom properties are available:\n\nCustom Property | Description | Default\n----------------|----------------\n--vaadin-crud-editor-max-height | max height of editor when opened on the bottom | 40%\n--vaadin-crud-editor-max-width | max width of editor when opened on the side | 40%\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
299
|
+
"attributes": [
|
|
300
|
+
{
|
|
301
|
+
"name": "editor-position",
|
|
302
|
+
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
303
|
+
"value": {
|
|
304
|
+
"type": [
|
|
305
|
+
"CrudEditorPosition"
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "edit-on-click",
|
|
311
|
+
"description": "Enables user to click on row to edit it.\nNote: When enabled, auto-generated grid won't show the edit column.",
|
|
312
|
+
"value": {
|
|
313
|
+
"type": [
|
|
314
|
+
"boolean"
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "no-filter",
|
|
320
|
+
"description": "Disable filtering when grid is autoconfigured.",
|
|
321
|
+
"value": {
|
|
322
|
+
"type": [
|
|
323
|
+
"boolean",
|
|
324
|
+
"null",
|
|
325
|
+
"undefined"
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "no-sort",
|
|
331
|
+
"description": "Disable sorting when grid is autoconfigured.",
|
|
332
|
+
"value": {
|
|
333
|
+
"type": [
|
|
334
|
+
"boolean",
|
|
335
|
+
"null",
|
|
336
|
+
"undefined"
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "no-head",
|
|
342
|
+
"description": "Remove grid headers when it is autoconfigured.",
|
|
343
|
+
"value": {
|
|
344
|
+
"type": [
|
|
345
|
+
"boolean",
|
|
346
|
+
"null",
|
|
347
|
+
"undefined"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "include",
|
|
353
|
+
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
354
|
+
"value": {
|
|
355
|
+
"type": [
|
|
356
|
+
"string",
|
|
357
|
+
"null",
|
|
358
|
+
"undefined"
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "exclude",
|
|
364
|
+
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
365
|
+
"value": {
|
|
366
|
+
"type": [
|
|
367
|
+
"string",
|
|
368
|
+
"null",
|
|
369
|
+
"undefined"
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "editor-opened",
|
|
375
|
+
"description": "Reflects the opened status of the editor.",
|
|
376
|
+
"value": {
|
|
377
|
+
"type": [
|
|
378
|
+
"boolean",
|
|
379
|
+
"null",
|
|
380
|
+
"undefined"
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "no-toolbar",
|
|
386
|
+
"description": "Controls visibility state of toolbar.\nWhen set to false toolbar is hidden and shown when set to true.",
|
|
387
|
+
"value": {
|
|
388
|
+
"type": [
|
|
389
|
+
"boolean",
|
|
390
|
+
"null",
|
|
391
|
+
"undefined"
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "theme",
|
|
397
|
+
"description": "The theme variants to apply to the component.",
|
|
398
|
+
"value": {
|
|
399
|
+
"type": [
|
|
400
|
+
"string",
|
|
401
|
+
"null",
|
|
402
|
+
"undefined"
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"js": {
|
|
408
|
+
"properties": [
|
|
409
|
+
{
|
|
410
|
+
"name": "items",
|
|
411
|
+
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
412
|
+
"value": {
|
|
413
|
+
"type": [
|
|
414
|
+
"Array.<unknown>",
|
|
415
|
+
"undefined"
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "editedItem",
|
|
421
|
+
"description": "The item being edited in the dialog.",
|
|
422
|
+
"value": {
|
|
423
|
+
"type": [
|
|
424
|
+
"unknown"
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"name": "editorPosition",
|
|
430
|
+
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
431
|
+
"value": {
|
|
432
|
+
"type": [
|
|
433
|
+
"CrudEditorPosition"
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "editOnClick",
|
|
439
|
+
"description": "Enables user to click on row to edit it.\nNote: When enabled, auto-generated grid won't show the edit column.",
|
|
440
|
+
"value": {
|
|
441
|
+
"type": [
|
|
442
|
+
"boolean"
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "dataProvider",
|
|
448
|
+
"description": "Function that provides items lazily. Receives arguments `params`, `callback`\n\n`params.page` Requested page index\n`params.pageSize` Current page size\n`params.filters` Currently applied filters\n`params.sortOrders` Currently applied sorting orders\n\n`callback(items, size)` Callback function with arguments:\n - `items` Current page of items\n - `size` Total number of items",
|
|
449
|
+
"value": {
|
|
450
|
+
"type": [
|
|
451
|
+
"CrudDataProvider",
|
|
452
|
+
"undefined"
|
|
453
|
+
]
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "noFilter",
|
|
458
|
+
"description": "Disable filtering when grid is autoconfigured.",
|
|
459
|
+
"value": {
|
|
460
|
+
"type": [
|
|
461
|
+
"boolean",
|
|
462
|
+
"null",
|
|
463
|
+
"undefined"
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "noSort",
|
|
469
|
+
"description": "Disable sorting when grid is autoconfigured.",
|
|
470
|
+
"value": {
|
|
471
|
+
"type": [
|
|
472
|
+
"boolean",
|
|
473
|
+
"null",
|
|
474
|
+
"undefined"
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "noHead",
|
|
480
|
+
"description": "Remove grid headers when it is autoconfigured.",
|
|
481
|
+
"value": {
|
|
482
|
+
"type": [
|
|
483
|
+
"boolean",
|
|
484
|
+
"null",
|
|
485
|
+
"undefined"
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "include",
|
|
491
|
+
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
492
|
+
"value": {
|
|
493
|
+
"type": [
|
|
494
|
+
"string",
|
|
495
|
+
"null",
|
|
496
|
+
"undefined"
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"name": "exclude",
|
|
502
|
+
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
503
|
+
"value": {
|
|
504
|
+
"type": [
|
|
505
|
+
"string",
|
|
506
|
+
"null",
|
|
507
|
+
"undefined"
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "editorOpened",
|
|
513
|
+
"description": "Reflects the opened status of the editor.",
|
|
514
|
+
"value": {
|
|
515
|
+
"type": [
|
|
516
|
+
"boolean",
|
|
517
|
+
"null",
|
|
518
|
+
"undefined"
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "noToolbar",
|
|
524
|
+
"description": "Controls visibility state of toolbar.\nWhen set to false toolbar is hidden and shown when set to true.",
|
|
525
|
+
"value": {
|
|
526
|
+
"type": [
|
|
527
|
+
"boolean",
|
|
528
|
+
"null",
|
|
529
|
+
"undefined"
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "i18n",
|
|
535
|
+
"description": "The object used to localize this component.\nFor changing the default localization, change the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n\n```\n{\n newItem: 'New item',\n editItem: 'Edit item',\n saveItem: 'Save',\n cancel: 'Cancel',\n deleteItem: 'Delete...',\n editLabel: 'Edit',\n confirm: {\n delete: {\n title: 'Confirm delete',\n content: 'Are you sure you want to delete the selected item? This action cannot be undone.',\n button: {\n confirm: 'Delete',\n dismiss: 'Cancel'\n }\n },\n cancel: {\n title: 'Unsaved changes',\n content: 'There are unsaved modifications to the item.',\n button: {\n confirm: 'Discard',\n dismiss: 'Continue editing'\n }\n }\n }\n}\n```",
|
|
536
|
+
"value": {
|
|
537
|
+
"type": [
|
|
538
|
+
"CrudI18n"
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
"events": [
|
|
544
|
+
{
|
|
545
|
+
"name": "cancel",
|
|
546
|
+
"description": "Fired when user discards edition. If the default is prevented, then\nno action is performed, user is responsible to close dialog and reset\nitem and grid."
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "delete",
|
|
550
|
+
"description": "Fired when user wants to delete item. If the default is prevented, then\nno action is performed, items array is not modified nor dialog closed"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"name": "edit",
|
|
554
|
+
"description": "Fired when user wants to edit an existing item. If the default is prevented, then\na new item is not assigned to the form, giving that responsibility to the app, though\ndialog is always opened."
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "new",
|
|
558
|
+
"description": "Fired when user wants to create a new item."
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "save",
|
|
562
|
+
"description": "Fired when user wants to save a new or an existing item. If the default is prevented, then\nno action is performed, items array is not modified nor dialog closed"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"name": "items-changed",
|
|
566
|
+
"description": "Fired when the `items` property changes."
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"name": "edited-item-changed",
|
|
570
|
+
"description": "Fired when the `editedItem` property changes."
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "editor-opened-changed",
|
|
574
|
+
"description": "Fired when the `editorOpened` property changes."
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "size-changed",
|
|
578
|
+
"description": "Fired when the `size` property changes."
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "editedItem-changed",
|
|
582
|
+
"description": "Fired when the `editedItem` property changes."
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"name": "editorOpened-changed",
|
|
586
|
+
"description": "Fired when the `editorOpened` property changes."
|
|
587
|
+
}
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/crud",
|
|
4
|
+
"version": "23.3.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-crud-edit",
|
|
19
|
+
"description": "`<vaadin-crud-edit>` is a helper element for `<vaadin-grid-column>` that provides\nan easily themable button that fires an `edit` event with the row item as detail\nwhen clicked.\n\nTypical usage is in a `<vaadin-grid-column>` of a custom `<vaadin-grid>` inside\na `<vaadin-crud>` to enable editing.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "@edit",
|
|
24
|
+
"description": "Fired when user on the icon.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "vaadin-crud-edit-column",
|
|
33
|
+
"description": "`<vaadin-crud-edit-column>` is a helper element for the `<vaadin-grid>`\nthat provides a clickable and themable edit icon.\n\nTypical usage is in a custom `<vaadin-grid>` inside a `<vaadin-crud>`.\n\n#### Example:\n```html\n<vaadin-grid items=\"[[items]]\">\n <vaadin-crud-edit-column></vaadin-crud-edit-column>\n\n <vaadin-grid-column>\n ...\n```",
|
|
34
|
+
"extension": true,
|
|
35
|
+
"attributes": [
|
|
36
|
+
{
|
|
37
|
+
"name": "?resizable",
|
|
38
|
+
"description": "When set to true, the column is user-resizable.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "?frozen",
|
|
45
|
+
"description": "When true, the column is frozen. When a column inside of a column group is frozen,\nall of the sibling columns inside the group will get frozen also.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "?frozenToEnd",
|
|
52
|
+
"description": "When true, the column is frozen to end of grid.\n\nWhen a column inside of a column group is frozen to end, all of the sibling columns\ninside the group will get frozen to end also.\n\nColumn can not be set as `frozen` and `frozenToEnd` at the same time.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "?hidden",
|
|
59
|
+
"description": "When set to true, the cells for this column are hidden.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "?autoWidth",
|
|
66
|
+
"description": "Automatically sets the width of the column based on the column contents when this is set to `true`.\n\nFor performance reasons the column width is calculated automatically only once when the grid items\nare rendered for the first time and the calculation only considers the rows which are currently\nrendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell\ncontent changes, the column width might not match the contents anymore.\n\nHidden columns are ignored in the calculation and their widths are not automatically updated when\nyou show a column that was initially hidden.\n\nYou can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.\n\nThe column width may still grow larger when `flexGrow` is not 0.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": ".header",
|
|
73
|
+
"description": "Text content to display in the header cell of the column.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": ".textAlign",
|
|
80
|
+
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": ".headerRenderer",
|
|
87
|
+
"description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".footerRenderer",
|
|
94
|
+
"description": "Custom function for rendering the footer content.\nReceives two arguments:\n\n- `root` The footer cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": ".renderer",
|
|
101
|
+
"description": "Custom function for rendering the cell content.\nReceives three arguments:\n\n- `root` The cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.\n- `model` The object with the properties related with\n the rendered item, contains:\n - `model.index` The index of the item.\n - `model.item` The item.\n - `model.expanded` Sublevel toggle state.\n - `model.level` Level of the tree represented with a horizontal offset of the toggle button.\n - `model.selected` Selected state.\n - `model.detailsOpened` Details opened state.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": ".path",
|
|
108
|
+
"description": "Path to an item sub-property whose value gets displayed in the column body cells.\nThe property name is also shown in the column header if an explicit header or renderer isn't defined.",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": ".ariaLabel",
|
|
115
|
+
"description": "The arial-label for the edit button",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "vaadin-crud",
|
|
124
|
+
"description": "`<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-items) property.\n\nA grid and an editor will be automatically generated and configured based on the data structure provided.\n\n#### Example:\n```html\n<vaadin-crud items='[{\"name\": \"John\", \"surname\": \"Lennon\", \"role\": \"singer\"},\n {\"name\": \"Ringo\", \"surname\": \"Starr\", \"role\": \"drums\"}]'></vaadin-crud>\n```\n\n### Data Provider Function\n\nOtherwise, you can provide a [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-dataProvider) function.\n#### Example:\n```html\n<vaadin-crud></vaadin-crud>\n```\n```js\nconst crud = document.querySelector('vaadin-crud');\nconst users = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'}, ...];\ncrud.dataProvider = function(params, callback) {\n const chunk = users.slice(params.page * params.pageSize, params.page * params.pageSize + params.pageSize);\n callback(chunk, people.length);\n};\n```\n\nNOTE: The auto-generated editor only supports string types. If you need to handle special cases\ncustomizing the editor is discussed below.\n\n### Customization\n\nAlternatively you can fully configure the component by using `slot` names.\n\nSlot name | Description\n----------------|----------------\n`grid` | To replace the auto-generated grid with a custom one.\n`form` | To replace the auto-generated form.\n`toolbar` | To replace the toolbar content. Add an element with the attribute `new-button` for the new item action.\n\n#### Example:\n\n```html\n<vaadin-crud\n id=\"crud\"\n items='[{\"name\": \"John\", \"surname\": \"Lennon\", \"role\": \"singer\"},\n {\"name\": \"Ringo\", \"surname\": \"Starr\", \"role\": \"drums\"}]'\n>\n <vaadin-grid slot=\"grid\">\n <vaadin-crud-edit-column></vaadin-crud-edit-column>\n <vaadin-grid-column id=\"column1\"></vaadin-grid-column>\n <vaadin-grid-column id=\"column2\"></vaadin-grid-column>\n </vaadin-grid>\n\n <vaadin-form-layout slot=\"form\">\n <vaadin-text-field label=\"First\" path=\"name\"></vaadin-text-field>\n <vaadin-text-field label=\"Surname\" path=\"surname\"></vaadin-text-field>\n </vaadin-form-layout>\n\n <div slot=\"toolbar\">\n Total singers: [[size]]\n <button new-button>New singer</button>\n </div>\n</vaadin-crud>\n```\n```js\nconst crud = document.querySelector('#crud');\n\nconst column1 = document.querySelector('#column1');\ncolumn1.headerRenderer = (root, column) => {\n root.textContent = 'Name';\n};\ncolumn1.renderer = (root, column, model) => {\n root.textContent = model.item.name;\n};\n\nconst column2 = document.querySelector('#column2');\ncolumn2.headerRenderer = (root, column) => {\n root.textContent = 'Surname';\n};\ncolumn2.renderer = (root, column, model) => {\n root.textContent = model.item.surname;\n};\n```\n\n### Helpers\n\nThe following elements are used to auto-configure the grid and the editor\n- [`<vaadin-crud-edit-column>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud-edit-column)\n- `<vaadin-crud-grid>` - can be replaced with custom [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-grid)\n- `<vaadin-crud-form>` - can be replaced with custom [`<vaadin-form-layout>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-form-layout)\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`toolbar` | Toolbar container at the bottom. By default it contains the the `new` button\n\nThe following custom properties are available:\n\nCustom Property | Description | Default\n----------------|----------------\n--vaadin-crud-editor-max-height | max height of editor when opened on the bottom | 40%\n--vaadin-crud-editor-max-width | max width of editor when opened on the side | 40%\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
125
|
+
"extension": true,
|
|
126
|
+
"attributes": [
|
|
127
|
+
{
|
|
128
|
+
"name": "?editOnClick",
|
|
129
|
+
"description": "Enables user to click on row to edit it.\nNote: When enabled, auto-generated grid won't show the edit column.",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "expression"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "?noFilter",
|
|
136
|
+
"description": "Disable filtering when grid is autoconfigured.",
|
|
137
|
+
"value": {
|
|
138
|
+
"kind": "expression"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "?noSort",
|
|
143
|
+
"description": "Disable sorting when grid is autoconfigured.",
|
|
144
|
+
"value": {
|
|
145
|
+
"kind": "expression"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "?noHead",
|
|
150
|
+
"description": "Remove grid headers when it is autoconfigured.",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "?editorOpened",
|
|
157
|
+
"description": "Reflects the opened status of the editor.",
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "expression"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "?noToolbar",
|
|
164
|
+
"description": "Controls visibility state of toolbar.\nWhen set to false toolbar is hidden and shown when set to true.",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "expression"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": ".items",
|
|
171
|
+
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
172
|
+
"value": {
|
|
173
|
+
"kind": "expression"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": ".editedItem",
|
|
178
|
+
"description": "The item being edited in the dialog.",
|
|
179
|
+
"value": {
|
|
180
|
+
"kind": "expression"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": ".editorPosition",
|
|
185
|
+
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
186
|
+
"value": {
|
|
187
|
+
"kind": "expression"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": ".dataProvider",
|
|
192
|
+
"description": "Function that provides items lazily. Receives arguments `params`, `callback`\n\n`params.page` Requested page index\n`params.pageSize` Current page size\n`params.filters` Currently applied filters\n`params.sortOrders` Currently applied sorting orders\n\n`callback(items, size)` Callback function with arguments:\n - `items` Current page of items\n - `size` Total number of items",
|
|
193
|
+
"value": {
|
|
194
|
+
"kind": "expression"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": ".include",
|
|
199
|
+
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
200
|
+
"value": {
|
|
201
|
+
"kind": "expression"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": ".exclude",
|
|
206
|
+
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
207
|
+
"value": {
|
|
208
|
+
"kind": "expression"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": ".i18n",
|
|
213
|
+
"description": "The object used to localize this component.\nFor changing the default localization, change the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n\n```\n{\n newItem: 'New item',\n editItem: 'Edit item',\n saveItem: 'Save',\n cancel: 'Cancel',\n deleteItem: 'Delete...',\n editLabel: 'Edit',\n confirm: {\n delete: {\n title: 'Confirm delete',\n content: 'Are you sure you want to delete the selected item? This action cannot be undone.',\n button: {\n confirm: 'Delete',\n dismiss: 'Cancel'\n }\n },\n cancel: {\n title: 'Unsaved changes',\n content: 'There are unsaved modifications to the item.',\n button: {\n confirm: 'Discard',\n dismiss: 'Continue editing'\n }\n }\n }\n}\n```",
|
|
214
|
+
"value": {
|
|
215
|
+
"kind": "expression"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "@cancel",
|
|
220
|
+
"description": "Fired when user discards edition. If the default is prevented, then\nno action is performed, user is responsible to close dialog and reset\nitem and grid.",
|
|
221
|
+
"value": {
|
|
222
|
+
"kind": "expression"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "@delete",
|
|
227
|
+
"description": "Fired when user wants to delete item. If the default is prevented, then\nno action is performed, items array is not modified nor dialog closed",
|
|
228
|
+
"value": {
|
|
229
|
+
"kind": "expression"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "@edit",
|
|
234
|
+
"description": "Fired when user wants to edit an existing item. If the default is prevented, then\na new item is not assigned to the form, giving that responsibility to the app, though\ndialog is always opened.",
|
|
235
|
+
"value": {
|
|
236
|
+
"kind": "expression"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "@new",
|
|
241
|
+
"description": "Fired when user wants to create a new item.",
|
|
242
|
+
"value": {
|
|
243
|
+
"kind": "expression"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "@save",
|
|
248
|
+
"description": "Fired when user wants to save a new or an existing item. If the default is prevented, then\nno action is performed, items array is not modified nor dialog closed",
|
|
249
|
+
"value": {
|
|
250
|
+
"kind": "expression"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "@items-changed",
|
|
255
|
+
"description": "Fired when the `items` property changes.",
|
|
256
|
+
"value": {
|
|
257
|
+
"kind": "expression"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "@edited-item-changed",
|
|
262
|
+
"description": "Fired when the `editedItem` property changes.",
|
|
263
|
+
"value": {
|
|
264
|
+
"kind": "expression"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "@editor-opened-changed",
|
|
269
|
+
"description": "Fired when the `editorOpened` property changes.",
|
|
270
|
+
"value": {
|
|
271
|
+
"kind": "expression"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "@size-changed",
|
|
276
|
+
"description": "Fired when the `size` property changes.",
|
|
277
|
+
"value": {
|
|
278
|
+
"kind": "expression"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "@editedItem-changed",
|
|
283
|
+
"description": "Fired when the `editedItem` property changes.",
|
|
284
|
+
"value": {
|
|
285
|
+
"kind": "expression"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "@editorOpened-changed",
|
|
290
|
+
"description": "Fired when the `editorOpened` property changes.",
|
|
291
|
+
"value": {
|
|
292
|
+
"kind": "expression"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|