@dile/crud 2.1.6 → 2.1.7
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.
|
@@ -51,6 +51,11 @@ export class DileCrudList extends DileI18nMixin(DileLoading(LitElement)) {
|
|
|
51
51
|
margin: 0.2rem 0.6rem 0.2rem 0;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
.elements-container {
|
|
55
|
+
display: grid;
|
|
56
|
+
grid-template-columns: var(--dile-crud-list-elements-container-template-columns, 1fr);
|
|
57
|
+
gap: var(--dile-crud-list-elements-container-gap, 0);
|
|
58
|
+
}
|
|
54
59
|
`
|
|
55
60
|
];
|
|
56
61
|
|
|
@@ -201,21 +206,23 @@ export class DileCrudList extends DileI18nMixin(DileLoading(LitElement)) {
|
|
|
201
206
|
|
|
202
207
|
get elementsTemplate() {
|
|
203
208
|
return html`
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
209
|
+
<div class="elements-container">
|
|
210
|
+
${this.elements.map(element => html`
|
|
211
|
+
<dile-crud-list-item
|
|
212
|
+
.item=${element}
|
|
213
|
+
itemId="${this.computeItemId(element)}"
|
|
214
|
+
.actionIds="${this.actionIds}"
|
|
215
|
+
?disableEdit=${!this.isItemEditable(element)}
|
|
216
|
+
?disableDelete=${!this.isItemDeletable(element)}
|
|
217
|
+
?disableRestore=${this.config?.customization?.disableRestore}
|
|
218
|
+
?hideCheckboxSelection="${this.config?.customization?.hideCheckboxSelection}"
|
|
219
|
+
@item-checkbox-changed=${this.onItemsCheckboxChanged}
|
|
220
|
+
?isDeleted=${element.deleted_at}
|
|
221
|
+
>
|
|
222
|
+
${this.config.templates.item(element)}
|
|
223
|
+
</dile-crud-list-item>
|
|
224
|
+
`)}
|
|
225
|
+
</div>
|
|
219
226
|
`;
|
|
220
227
|
}
|
|
221
228
|
|
|
@@ -7,9 +7,9 @@ export class DileCrudListItem extends LitElement {
|
|
|
7
7
|
static styles = [
|
|
8
8
|
css`
|
|
9
9
|
:host {
|
|
10
|
-
display: block;
|
|
11
|
-
max-width: 100
|
|
12
|
-
width: 100
|
|
10
|
+
display: var(--dile-crud-list-item-display, block);
|
|
11
|
+
max-width: var(--dile-crud-list-item-max-width, 100%);
|
|
12
|
+
width: var(--dile-crud-list-item-width, 100%);
|
|
13
13
|
}
|
|
14
14
|
section {
|
|
15
15
|
max-width: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/crud",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "Components to create a generic crud system based on Web Components and Lit",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://dile-components.com/",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dile/ui": "^3.4.
|
|
28
|
+
"@dile/ui": "^3.4.1",
|
|
29
29
|
"axios": "^1.19.0",
|
|
30
30
|
"lit": "^2.7.0 || ^3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "325f533d434d8f13b9e4095cc24278b6185091dd"
|
|
36
36
|
}
|