@svgrid/grid 2.2.33 → 2.2.34
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/dist/GridFooter.svelte +46 -7
- package/dist/SvGrid.css +10 -0
- package/dist/cdn/{GridMenus-BxmIvCJh.js → GridMenus-T-bZNprc.js} +153 -150
- package/dist/cdn/{GridMenus-B7XhhqdN.js → GridMenus-oQYElQll.js} +4 -4
- package/dist/cdn/{SvDateTimePicker-ClqtVIj3.js → SvDateTimePicker-CHnUkWcH.js} +163 -163
- package/dist/cdn/{SvDateTimePicker-o94wfSUa.js → SvDateTimePicker-CRQH_U7E.js} +570 -553
- package/dist/cdn/{SvGridChart-BhnFdLd0.js → SvGridChart-BEJmNNx9.js} +1 -1
- package/dist/cdn/{SvGridChart-Cr_90pPD.js → SvGridChart-BwVos976.js} +27 -20
- package/dist/cdn/{SvGridChartPanel-Cmx9DHAS.js → SvGridChartPanel-BOknOkrP.js} +2 -2
- package/dist/cdn/{SvGridChartPanel-ICbxiUvK.js → SvGridChartPanel-D2PjII4O.js} +20 -12
- package/dist/cdn/{SvGridChartView-Bx42PMvf.js → SvGridChartView-00LPUHL1.js} +3 -3
- package/dist/cdn/{SvGridChartView-B40DTJSX.js → SvGridChartView-BhUEJ5ki.js} +2 -2
- package/dist/cdn/{SvGridDropdown-CUOdm7YA.js → SvGridDropdown-D13MtJ2j.js} +5 -4
- package/dist/cdn/{chart-T1usDN0o.js → chart-i4XcXyHJ.js} +12 -10
- package/dist/cdn/{disclose-version-DljhZohK.js → disclose-version-Dr7rEVv-.js} +989 -1081
- package/dist/cdn/{export-format-JT5pWVT8.js → export-format-Cv1Dll6k.js} +66 -245
- package/dist/cdn/{src-ktbQVOk-.js → src-72QTH8lh.js} +9004 -8792
- package/dist/cdn/{src-erjBRYfX.js → src-Cm7C_WOZ.js} +9204 -8908
- package/dist/cdn/svgrid.js +9 -9
- package/dist/cdn/svgrid.svelte-external.js +8 -8
- package/dist/columns.js +9 -2
- package/package.json +1 -1
- package/src/GridFooter.svelte +46 -7
- package/src/SvGrid.css +10 -0
- package/src/columns.ts +7 -2
- package/src/svgrid.footer-pagesize.svelte.test.ts +86 -0
package/dist/GridFooter.svelte
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
type TableFeatures,
|
|
5
5
|
} from "./index";
|
|
6
6
|
import "./sv-grid-scrollbar";
|
|
7
|
-
import SvGridDropdown from "./SvGridDropdown.svelte";
|
|
8
7
|
import {
|
|
9
8
|
fmtStat,
|
|
10
9
|
} from "./SvGrid.helpers";
|
|
@@ -28,6 +27,26 @@
|
|
|
28
27
|
pageSizeOptions?: number[];
|
|
29
28
|
} = $props();
|
|
30
29
|
|
|
30
|
+
// SvGridDropdown is ~22 KB and exists here only to pick one of four numbers.
|
|
31
|
+
// Importing it statically also dragged it into the base bundle and silently
|
|
32
|
+
// defeated the lazy `import()` in SvGrid.svelte, which loads the same
|
|
33
|
+
// component as a cell editor. So the closed trigger below is plain markup
|
|
34
|
+
// reusing the dropdown's own classes (identical appearance), and the real
|
|
35
|
+
// component is fetched on first open. Keep this lazy: a static import here
|
|
36
|
+
// re-breaks the cell-editor split too, not just the footer.
|
|
37
|
+
let PageSizeDropdown = $state<typeof import("./SvGridDropdown.svelte").default | null>(null);
|
|
38
|
+
let loadingPageSize = $state(false);
|
|
39
|
+
|
|
40
|
+
async function openPageSize() {
|
|
41
|
+
if (PageSizeDropdown || loadingPageSize) return;
|
|
42
|
+
loadingPageSize = true;
|
|
43
|
+
try {
|
|
44
|
+
PageSizeDropdown = (await import("./SvGridDropdown.svelte")).default;
|
|
45
|
+
} finally {
|
|
46
|
+
loadingPageSize = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
31
50
|
// View facade: re-bind the controller's reactive members so the markup
|
|
32
51
|
// (moved verbatim from SvGrid.svelte) stays identical.
|
|
33
52
|
const paginationEnabled = $derived(ctrl.paginationEnabled);
|
|
@@ -88,12 +107,32 @@
|
|
|
88
107
|
<div class="sv-grid-pagination-pagesize">
|
|
89
108
|
<span>{messages.pageSize}</span>
|
|
90
109
|
<div class="sv-grid-pagination-pagesize-dd">
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
{#if PageSizeDropdown}
|
|
111
|
+
<!-- autoOpen so the click that triggered the load also opens the
|
|
112
|
+
panel, rather than making the user click a second time. -->
|
|
113
|
+
<PageSizeDropdown
|
|
114
|
+
options={sizes.map((n) => ({ value: n, label: String(n) }))}
|
|
115
|
+
value={pageSize}
|
|
116
|
+
autoOpen={true}
|
|
117
|
+
onChange={(v) => setPageSize(Number(v))}
|
|
118
|
+
/>
|
|
119
|
+
{:else}
|
|
120
|
+
<!-- Mirrors SvGridDropdown's closed trigger exactly (same classes,
|
|
121
|
+
same ARIA) so there is no visual change and no layout shift
|
|
122
|
+
when the real component swaps in. -->
|
|
123
|
+
<div class="sv-grid-dropdown">
|
|
124
|
+
<button
|
|
125
|
+
type="button"
|
|
126
|
+
class="sv-grid-dropdown-trigger"
|
|
127
|
+
aria-haspopup="listbox"
|
|
128
|
+
aria-expanded="false"
|
|
129
|
+
onclick={openPageSize}
|
|
130
|
+
>
|
|
131
|
+
<span class="sv-grid-dropdown-label">{pageSize}</span>
|
|
132
|
+
<span class="sv-grid-dropdown-caret" aria-hidden="true">▾</span>
|
|
133
|
+
</button>
|
|
134
|
+
</div>
|
|
135
|
+
{/if}
|
|
97
136
|
</div>
|
|
98
137
|
</div>
|
|
99
138
|
<span class="sv-grid-pagination-range">
|
package/dist/SvGrid.css
CHANGED
|
@@ -1012,6 +1012,11 @@
|
|
|
1012
1012
|
width: 16px;
|
|
1013
1013
|
height: 16px;
|
|
1014
1014
|
margin: 0 auto;
|
|
1015
|
+
/* The UA stylesheet gives <button> "padding: 1px 6px" on top of
|
|
1016
|
+
"box-sizing: border-box", which leaves 2px of content width inside the
|
|
1017
|
+
16px box. The glyphs below then shrink to a sliver, and the tick renders
|
|
1018
|
+
as a bare slanted line. Guarded by tests/e2e/selection-checkbox.spec.ts. */
|
|
1019
|
+
padding: 0;
|
|
1015
1020
|
border: 1px solid var(--sg-input-border, #8794a8);
|
|
1016
1021
|
border-radius: 4px;
|
|
1017
1022
|
background: var(--sg-input-bg, #fff);
|
|
@@ -1089,6 +1094,7 @@ select.sv-grid-fr-editor {
|
|
|
1089
1094
|
|
|
1090
1095
|
.sv-grid-checkbox[aria-checked="true"]::after {
|
|
1091
1096
|
content: "";
|
|
1097
|
+
flex: none;
|
|
1092
1098
|
width: 5px;
|
|
1093
1099
|
height: 9px;
|
|
1094
1100
|
border-right: 2px solid currentColor;
|
|
@@ -1098,6 +1104,7 @@ select.sv-grid-fr-editor {
|
|
|
1098
1104
|
|
|
1099
1105
|
.sv-grid-checkbox[aria-checked="mixed"]::after {
|
|
1100
1106
|
content: "";
|
|
1107
|
+
flex: none;
|
|
1101
1108
|
width: 8px;
|
|
1102
1109
|
height: 2px;
|
|
1103
1110
|
border-radius: 1px;
|
|
@@ -2391,6 +2398,9 @@ select.sv-grid-fr-editor {
|
|
|
2391
2398
|
.sv-grid-find-step, .sv-grid-find-close {
|
|
2392
2399
|
display: inline-flex; align-items: center; justify-content: center;
|
|
2393
2400
|
width: 22px; height: 22px;
|
|
2401
|
+
/* Same fixed-box + UA <button> padding trap as .sv-grid-checkbox: without
|
|
2402
|
+
this reset the 6px side padding squeezes the icon inside the 22px box. */
|
|
2403
|
+
padding: 0;
|
|
2394
2404
|
background: transparent;
|
|
2395
2405
|
border: 0;
|
|
2396
2406
|
color: var(--sg-muted, #64748b);
|