@dile/crud 1.9.1 → 1.9.2

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.
@@ -111,6 +111,7 @@ export class DileManyRelation extends DileI18nMixin(LitElement) {
111
111
  itemTemplate: { type: Object },
112
112
  getListItems: { type: Object },
113
113
  addRelationLabel: { type: String },
114
+ emptyListMessage: { type: String },
114
115
  bodyIdProperty: { type: String },
115
116
 
116
117
  // Internal state
@@ -204,7 +205,7 @@ export class DileManyRelation extends DileI18nMixin(LitElement) {
204
205
  ${this._loadingList
205
206
  ? html`<dile-spinner active></dile-spinner>`
206
207
  : this._items.length === 0
207
- ? html`<p class="empty-msg">${this.translations?.empty_list ?? 'There are no items yet'}</p>`
208
+ ? html`<p class="empty-msg">${this.emptyListMessageComputed(this.emptyListMessage, this.translations)}</p>`
208
209
  : this._items.map(item => html`
209
210
  <div class="relation-item">
210
211
  <span class="relation-item-content">${this.itemTemplate(item)}</span>
@@ -296,4 +297,8 @@ export class DileManyRelation extends DileI18nMixin(LitElement) {
296
297
  selectDefaultPlaceholderComputed(value, translations) {
297
298
  return value ? value : translations?.select_relation_placeholder ?? 'Select...';
298
299
  }
300
+
301
+ emptyListMessageComputed(message, translations) {
302
+ return message ? message : translations?.empty_list ?? 'There are no items yet';
303
+ }
299
304
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
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": "f56676f00eb84aed3ee4ffd8a0542988da652d51"
34
+ "gitHead": "1fe481edcd8ccfaf7a7aeb74f8d66a22a4423228"
35
35
  }