@molecule/app-data-table-ui-svelte 1.1.0 → 1.1.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.
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-24T08:57:38.586Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-data-table-ui-svelte
|
|
@@ -233,7 +233,7 @@ const TableToolbar: LegacyComponentType
|
|
|
233
233
|
|
|
234
234
|
Peer dependencies:
|
|
235
235
|
|
|
236
|
-
- `@molecule/app-svelte` ^3.
|
|
236
|
+
- `@molecule/app-svelte` ^3.13.0
|
|
237
237
|
- `@molecule/app-ui` ^1.3.11
|
|
238
238
|
- `@molecule/app-ui-svelte` ^1.1.0
|
|
239
239
|
- `svelte` ^5.0.0
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
`key={rowKey(row)}`), so a row keeps its DOM node while its key is unchanged.
|
|
8
8
|
-->
|
|
9
9
|
<script lang="ts" generics="T">
|
|
10
|
+
import { PresentWhileContent } from '@molecule/app-svelte'
|
|
10
11
|
import { getClassMap } from '@molecule/app-ui'
|
|
11
12
|
|
|
12
13
|
import type { ReactNodeProp } from './node-prop.js'
|
|
@@ -26,17 +27,27 @@
|
|
|
26
27
|
}: DataTableCardProps<T> = $props()
|
|
27
28
|
|
|
28
29
|
const cm = $derived(getClassMap())
|
|
29
|
-
|
|
30
|
-
const
|
|
30
|
+
// React's `slot(title)`/`slot(titleAction)`: a `null`, `false` or `''` node is absent, so the row goes.
|
|
31
|
+
const titleShown = $derived(
|
|
32
|
+
title !== undefined && title !== null && title !== '' && typeof title !== 'boolean',
|
|
33
|
+
)
|
|
34
|
+
const headerShown = $derived(
|
|
35
|
+
titleShown ||
|
|
36
|
+
(titleAction !== undefined &&
|
|
37
|
+
titleAction !== null &&
|
|
38
|
+
titleAction !== '' &&
|
|
39
|
+
typeof titleAction !== 'boolean'),
|
|
40
|
+
)
|
|
31
41
|
</script>
|
|
32
42
|
|
|
33
43
|
{#snippet node(value: ReactNodeProp | undefined)}
|
|
34
|
-
{#if typeof value === 'function'}{@render value()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
44
|
+
{#if typeof value === 'function'}{@render value?.()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
35
45
|
{/snippet}
|
|
36
46
|
|
|
37
47
|
<section data-mol-id={dataMolId} class={cm.cn(cm.stack(4), cm.dataTableCardShell, className)}>
|
|
38
48
|
{#if headerShown}
|
|
39
|
-
<
|
|
49
|
+
<PresentWhileContent
|
|
50
|
+
tag="div"
|
|
40
51
|
class={cm.cn(
|
|
41
52
|
cm.flex({ justify: 'between', align: 'center' }),
|
|
42
53
|
cm.sp('px', 8),
|
|
@@ -44,12 +55,15 @@
|
|
|
44
55
|
)}
|
|
45
56
|
>
|
|
46
57
|
{#if titleShown}
|
|
47
|
-
<
|
|
58
|
+
<PresentWhileContent
|
|
59
|
+
tag="h3"
|
|
60
|
+
class={cm.cn(cm.textSize('xl'), cm.fontWeight('bold'), cm.dataTableCardTitle)}
|
|
61
|
+
>
|
|
48
62
|
{@render node(title)}
|
|
49
|
-
</
|
|
63
|
+
</PresentWhileContent>
|
|
50
64
|
{/if}
|
|
51
65
|
{@render node(titleAction)}
|
|
52
|
-
</
|
|
66
|
+
</PresentWhileContent>
|
|
53
67
|
{/if}
|
|
54
68
|
<div class={cm.dataTableCardScroller}>
|
|
55
69
|
<table class={cm.cn(cm.w('full'), cm.dataTableCardTable)}>
|
|
@@ -106,7 +120,7 @@
|
|
|
106
120
|
column.cellClassName,
|
|
107
121
|
)}
|
|
108
122
|
>
|
|
109
|
-
{@render column.cell(row)}
|
|
123
|
+
{@render column.cell?.(row)}
|
|
110
124
|
</td>
|
|
111
125
|
{/each}
|
|
112
126
|
</tr>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCard.svelte.d.ts","sourceRoot":"","sources":["../src/DataTableCard.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableCard.svelte.d.ts","sourceRoot":"","sources":["../src/DataTableCard.svelte"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,iBAAS,QAAQ,CAAC,CAAC;WAgHU,kBAAkB,CAAC,CAAC,CAAC;;;;;EAA4E;AAC9H,cAAM,iBAAiB,CAAC,CAAC;IACrB,KAAK,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,MAAM,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,KAAK,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,QAAQ;IACR,OAAO;CACV;AAED,UAAU,qBAAqB;IAC3B,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;KAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5X,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3H,YAAY,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CACjE;AACD,QAAA,MAAM,aAAa,EAAE,qBAAmC,CAAC;AACvC,KAAK,aAAa,CAAC,CAAC,IAAI,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,eAAe,aAAa,CAAC"}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
{#snippet node(value: ReactNodeProp | undefined)}
|
|
20
|
-
{#if typeof value === 'function'}{@render value()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
20
|
+
{#if typeof value === 'function'}{@render value?.()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
21
21
|
{/snippet}
|
|
22
22
|
|
|
23
23
|
<tr
|
package/dist/TableEmpty.svelte
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
{#snippet node(value: ReactNodeProp | undefined)}
|
|
18
|
-
{#if typeof value === 'function'}{@render value()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
18
|
+
{#if typeof value === 'function'}{@render value?.()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
19
19
|
{/snippet}
|
|
20
20
|
|
|
21
21
|
<tr>
|
package/dist/TableFooter.svelte
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
{#snippet node(value: ReactNodeProp | undefined)}
|
|
18
|
-
{#if typeof value === 'function'}{@render value()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
18
|
+
{#if typeof value === 'function'}{@render value?.()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
19
19
|
{/snippet}
|
|
20
20
|
|
|
21
21
|
<div
|
package/dist/TableToolbar.svelte
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
{#snippet node(value: ReactNodeProp | undefined)}
|
|
18
|
-
{#if typeof value === 'function'}{@render value()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
18
|
+
{#if typeof value === 'function'}{@render value?.()}{:else if value !== undefined && value !== ''}{value}{/if}
|
|
19
19
|
{/snippet}
|
|
20
20
|
|
|
21
21
|
<div class={cm.cn(cm.stack(2), className)}>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-data-table-ui-svelte",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Card data table + table chrome primitives (toolbar, footer, row-with-actions, empty row) — standalone, renders its own table elements",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-data-table-ui-svelte",
|
|
6
6
|
"type": "module",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@molecule/app-svelte": "^3.
|
|
51
|
+
"@molecule/app-svelte": "^3.13.0",
|
|
52
52
|
"@molecule/app-ui": "^1.3.11",
|
|
53
53
|
"@molecule/app-ui-svelte": "^1.1.0",
|
|
54
54
|
"svelte": "^5.0.0"
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"@molecule/app-framework-conformance": "0.0.0",
|
|
58
58
|
"@molecule/app-i18n": "1.2.2",
|
|
59
59
|
"@molecule/app-icons": "1.0.4",
|
|
60
|
-
"@molecule/app-svelte": "3.
|
|
61
|
-
"@molecule/app-ui": "1.
|
|
62
|
-
"@molecule/app-ui-svelte": "1.
|
|
60
|
+
"@molecule/app-svelte": "3.14.1",
|
|
61
|
+
"@molecule/app-ui": "1.5.0",
|
|
62
|
+
"@molecule/app-ui-svelte": "1.4.2",
|
|
63
63
|
"@sveltejs/package": "3.0.2",
|
|
64
64
|
"@sveltejs/vite-plugin-svelte": "7.1.2",
|
|
65
65
|
"@types/node": "26.6.5",
|
|
66
|
-
"jsdom": "
|
|
66
|
+
"jsdom": "31.0.1",
|
|
67
67
|
"svelte": "5.57.2",
|
|
68
68
|
"svelte-check": "4.7.7",
|
|
69
69
|
"typescript": "6.0.3",
|