iconograph-ui 1.4.6 → 1.4.8
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.
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
export let format;
|
|
5
5
|
|
|
6
6
|
function formatDate(date, format, locale = "fr-FR") {
|
|
7
|
-
console.log(date);
|
|
8
7
|
if (date === null || date === undefined)
|
|
9
8
|
return "";
|
|
10
9
|
|
|
11
10
|
if (!(date instanceof Date)) {
|
|
12
11
|
date = new Date(date);
|
|
12
|
+
if (date.toString() == "Invalid Date")
|
|
13
|
+
return "";
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const pad = (num, size = 2) => num.toString().padStart(size, "0");
|
package/lib/form/Input.svelte
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{#each columns as c}
|
|
13
13
|
<div style="min-width: {c.width}px; width: {c.width}px;">
|
|
14
14
|
{#if c.component}
|
|
15
|
-
<svelte:component this={c.component} {...c.props} {...{ [c.field]: row[c.field], ...row }}/>
|
|
15
|
+
<svelte:component this={c.component} {...c.props} {...{ [c.field]: row[c.field], ...row }} {...{ [c.props.__field_name]: row[c.field], ...row }}/>
|
|
16
16
|
{:else}
|
|
17
17
|
<span>{ (row[c.field] && row[c.field] != "undefined") ? row[c.field] : ''}</span>
|
|
18
18
|
{/if}
|