@humandialog/forms.svelte 1.7.6 → 1.7.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.
@@ -358,14 +358,19 @@ async function onDownloadFile(e) {
358
358
  active: true,
359
359
  readonly: definition.title_readonly,
360
360
  }}>
361
- {element_title}
361
+ <span class="sm:hover:cursor-pointer underline"
362
+ on:click|stopPropagation={(e) => definition.onOpen(item)}>
363
+ {element_title}
364
+ </span>
362
365
 
366
+ <!--
363
367
  {#if definition.onOpen}
364
368
  <button class="ml-3 w-5 h-5 sm:w-3 sm:h-3"
365
369
  on:click={(e) => definition.onOpen(item)}>
366
370
  <FaExternalLinkAlt/>
367
371
  </button>
368
372
  {/if}
373
+ -->
369
374
  </p>
370
375
  {/if}
371
376
  {/key}
@@ -4,6 +4,7 @@ import { FaPlus } from "svelte-icons/fa";
4
4
  import { getPrev, getNext, swapElements, getLast, getFirst, remove, insertAt } from "../../utils";
5
5
  import { informModification, pushChanges } from "../../updates";
6
6
  import { tick } from "svelte";
7
+ import { i18n } from "../../i18n";
7
8
  export let objects;
8
9
  export let orderAttrib = void 0;
9
10
  export let inserter = void 0;
@@ -93,11 +94,21 @@ function onBlurInserter() {
93
94
  }
94
95
  </script>
95
96
 
96
- {#each objects as item, idx (item.Id)}
97
- {#key item} <!-- Forces to fully rerender when item changed to fire use: callbacks again -->
98
- <slot {item} {idx}/>
99
- {/key}
100
- {/each }
97
+
98
+ {#if objects && objects.length > 0}
99
+ {#each objects as item, idx (item.Id)}
100
+ {#key item} <!-- Forces to fully rerender when item changed to fire use: callbacks again -->
101
+ <slot {item} {idx}/>
102
+ {/key}
103
+ {/each }
104
+ {:else}
105
+ <p class="text-xs text-center uppercase text-stone-900 dark:text-stone-400">
106
+ {i18n({
107
+ en: 'No elements',
108
+ es: 'Falta de elementos',
109
+ pl: 'Brak elementów'})}
110
+ </p>
111
+ {/if}
101
112
 
102
113
  {#if inserter}
103
114
  <Edit class=" mb-2 ml-2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",