@dile/crud 0.7.2 → 0.7.3

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.
@@ -205,6 +205,7 @@ export class DileCrudList extends DileI18nMixin(DileLoading(LitElement)) {
205
205
  ?disableDelete="${this.config?.customization?.disableDelete}"
206
206
  ?hideCheckboxSelection="${this.config?.customization?.hideCheckboxSelection}"
207
207
  @item-checkbox-changed=${this.onItemsCheckboxChanged}
208
+ ?isDeleted=${element.deleted_at}
208
209
  >
209
210
  ${this.config.templates.item(element)}
210
211
  </dile-crud-list-item>
@@ -57,6 +57,7 @@ export class DileCrudListItem extends LitElement {
57
57
  disableDelete: { type: Boolean },
58
58
  /** Hide checkboxes on the item list */
59
59
  hideCheckboxSelection: { type: Boolean },
60
+ isDeleted: { type: Boolean },
60
61
  };
61
62
  }
62
63
 
@@ -79,17 +80,26 @@ export class DileCrudListItem extends LitElement {
79
80
  <slot></slot>
80
81
  </main>
81
82
  <div class="actions">
82
- ${this.disableEdit
83
+ ${this.isDeleted
84
+ ? ''
85
+ : this.regularActionsTemplate
86
+ }
87
+ </div>
88
+ </section>
89
+ `;
90
+ }
91
+
92
+ get regularActionsTemplate() {
93
+ return html`
94
+ ${this.disableEdit
83
95
  ? ''
84
96
  : html`<dile-icon .icon="${editIcon}" @click=${this.editClick}></dile-icon>`
85
97
  }
86
- ${this.disableDelete
98
+ ${this.disableDelete
87
99
  ? ''
88
100
  : html`<dile-icon class="delete" .icon="${deleteIcon}" @click=${this.deleteClick}></dile-icon>`
89
101
  }
90
- </div>
91
- </section>
92
- `;
102
+ `
93
103
  }
94
104
 
95
105
  includes(actionIds, itemId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Components to create a generic crud system based on Web Components and Lit",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "23cccd2c6346a026fe4dae9374520e604c620085"
34
+ "gitHead": "7abd2a48c8093bb54b939b0b2ca1762ed0d55693"
35
35
  }