@humandialog/forms.svelte 1.7.5 → 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.
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
return idx < entriesNo-maxEntriesNo
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
let containerElement
|
|
46
47
|
let scrollableElement
|
|
47
48
|
/*let isScrolling = false
|
|
48
49
|
let startScrollLeft = 0
|
|
@@ -84,14 +85,21 @@
|
|
|
84
85
|
const elementsNo = pathElements.length
|
|
85
86
|
if(elementsNo > 0)
|
|
86
87
|
{
|
|
87
|
-
|
|
88
|
-
lastElement
|
|
88
|
+
// container: "nearest" not supported on iOS and mobile FF
|
|
89
|
+
//const lastElement = pathElements[elementsNo-1]
|
|
90
|
+
//lastElement.scrollIntoView({ container: "nearest"})
|
|
91
|
+
|
|
92
|
+
const containerRect = containerElement.getBoundingClientRect()
|
|
93
|
+
const wholeWidth = containerElement.scrollWidth
|
|
94
|
+
const visibleWidth = containerRect.width
|
|
95
|
+
containerElement.scrollLeft = wholeWidth - visibleWidth
|
|
96
|
+
|
|
89
97
|
}
|
|
90
98
|
})
|
|
91
99
|
|
|
92
100
|
</script>
|
|
93
101
|
|
|
94
|
-
<nav class="{userClass} w-full sm:w-fit sm:max-w-full overflow-x-auto sm:overflow-x-hidden" aria-label="Breadcrumb">
|
|
102
|
+
<nav class="{userClass} w-full sm:w-fit sm:max-w-full overflow-x-auto sm:overflow-x-hidden" aria-label="Breadcrumb" bind:this={containerElement}>
|
|
95
103
|
<ol class="flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse flex-nowrap min-h-[1.25rem]" bind:this={scrollableElement}>
|
|
96
104
|
|
|
97
105
|
{#if (segments && segments.length > 0)}
|
|
@@ -358,14 +358,19 @@ async function onDownloadFile(e) {
|
|
|
358
358
|
active: true,
|
|
359
359
|
readonly: definition.title_readonly,
|
|
360
360
|
}}>
|
|
361
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{
|
|
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
|