@svgrid/grid 3.0.3 → 4.0.0
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 +5 -4
- package/dist/GridMenus.svelte +44 -2
- package/dist/SvChartMenu.svelte +69 -0
- package/dist/SvChartMenu.svelte.d.ts +11 -0
- package/dist/SvChartPanes.svelte +113 -0
- package/dist/SvChartPanes.svelte.d.ts +20 -0
- package/dist/SvGrid.controller.svelte.d.ts +122 -41
- package/dist/SvGrid.controller.svelte.js +845 -207
- package/dist/SvGrid.css +178 -2
- package/dist/SvGrid.svelte +467 -516
- package/dist/SvGrid.types.d.ts +315 -12
- package/dist/SvGridCellEditor.svelte +17 -0
- package/dist/SvGridChart.svelte +2257 -329
- package/dist/SvGridChart.svelte.d.ts +6 -106
- package/dist/SvGridChart.types.d.ts +338 -0
- package/dist/SvGridChart.types.js +1 -0
- package/dist/SvGridChartBuilder.svelte +323 -0
- package/dist/SvGridChartBuilder.svelte.d.ts +34 -0
- package/dist/SvGridChartPanel.svelte +221 -275
- package/dist/SvGridChartPickers.svelte +417 -0
- package/dist/SvGridChartPickers.svelte.d.ts +70 -0
- package/dist/SvGridChartView.svelte +13 -14
- package/dist/SvModal.svelte +7 -1
- package/dist/SvModal.svelte.d.ts +5 -0
- package/dist/ai.d.ts +40 -8
- package/dist/ai.js +135 -24
- package/dist/aria.d.ts +11 -0
- package/dist/build-api.js +119 -28
- package/dist/cdn/GridMenus-CLI93jke.js +635 -0
- package/dist/cdn/{GridMenus-DhdPF700.js → GridMenus-CwooL3QA.js} +240 -207
- package/dist/cdn/SvChartMenu-Bl6PBbkT.js +58 -0
- package/dist/cdn/SvChartMenu-FBSMINA6.js +59 -0
- package/dist/cdn/{SvDateRangeInput-DMLKmGEc.js → SvDateRangeInput-BeU_TkbQ.js} +15 -14
- package/dist/cdn/{SvDateRangeInput-CaOuMs8O.js → SvDateRangeInput-yX8vzleW.js} +38 -37
- package/dist/cdn/{SvDateTimePicker-sonaH0oh.js → SvDateTimePicker-DQwt4UAs.js} +139 -180
- package/dist/cdn/SvDateTimePicker-vNU6bZ-q.js +775 -0
- package/dist/cdn/{SvGridCellEditor-CjEJMJKc.js → SvGridCellEditor-B1p-vCK5.js} +188 -178
- package/dist/cdn/{SvGridCellEditor-BWnTi2N7.js → SvGridCellEditor-D_0q4xAu.js} +98 -88
- package/dist/cdn/SvGridChart-C3EWAZaM.js +3574 -0
- package/dist/cdn/SvGridChart-DzLkSwCH.js +3572 -0
- package/dist/cdn/SvGridChartBuilder-BE2T1ykB.js +783 -0
- package/dist/cdn/SvGridChartBuilder-CfII62sZ.js +784 -0
- package/dist/cdn/SvGridChartPanel-CCX5_Wgd.js +675 -0
- package/dist/cdn/SvGridChartPanel-xf4sWVTo.js +699 -0
- package/dist/cdn/SvGridChartView-CfuXmY5I.js +48 -0
- package/dist/cdn/SvGridChartView-DYwabQWj.js +47 -0
- package/dist/cdn/SvMenuList-CLN8OuIK.js +452 -0
- package/dist/cdn/SvMenuList-DkGhNKjf.js +451 -0
- package/dist/cdn/SvModal-BAE-pjZX.js +396 -0
- package/dist/cdn/SvModal-CIZWCcad.js +397 -0
- package/dist/cdn/chart-Dz7SqMXH.js +4341 -0
- package/dist/cdn/chart-export-BXqueeWJ.js +135 -0
- package/dist/cdn/chart-export-pdf-DONFUnNY.js +110 -0
- package/dist/cdn/chart-panel-messages-CUbf2R4i.js +1052 -0
- package/dist/cdn/chart-panel-messages-CmNrMdsr.js +1053 -0
- package/dist/cdn/chart-summary-BJW_tg_X.js +138 -0
- package/dist/cdn/chart-trend-CaN9mDEV.js +50 -0
- package/dist/cdn/chart-validate-HcOVFAfJ.js +188 -0
- package/dist/cdn/{column-resize-DsfNXMom.js → column-resize-DpmOLfRp.js} +3 -3
- package/dist/cdn/{date-format-BnnHlqGw.js → date-format-CtquV-p3.js} +583 -603
- package/dist/cdn/{date-format-BNii4zeD.js → date-format-D6KFzU_W.js} +347 -367
- package/dist/cdn/dismissable-DAHetSNk.js +44 -0
- package/dist/cdn/editor-contract-LXgQJAgd.js +22 -0
- package/dist/cdn/focus-trap-BBOQYBma.js +65 -0
- package/dist/cdn/{row-resize-BRcimkUT.js → row-resize-niQCp040.js} +44 -36
- package/dist/cdn/server-block-cache-CGoWz-87.js +237 -0
- package/dist/cdn/{src-D6XvA1Ij.js → src-B6HXdfHY.js} +10448 -10049
- package/dist/cdn/{src-Bugf5XlI.js → src-C6Iowdvs.js} +6908 -6509
- package/dist/cdn/svgrid.js +27 -15
- package/dist/cdn/svgrid.svelte-external.js +27 -15
- package/dist/cdn/validate-CchXzyrX.js +76 -0
- package/dist/chart-axes.d.ts +53 -0
- package/dist/chart-axes.js +351 -0
- package/dist/chart-cartesian.d.ts +88 -0
- package/dist/chart-cartesian.js +1862 -0
- package/dist/chart-decimate.d.ts +51 -0
- package/dist/chart-decimate.js +199 -0
- package/dist/chart-export-pdf.d.ts +47 -0
- package/dist/chart-export-pdf.js +187 -0
- package/dist/chart-export.d.ts +2 -1
- package/dist/chart-export.js +18 -3
- package/dist/chart-financial.d.ts +91 -0
- package/dist/chart-financial.js +175 -0
- package/dist/chart-flow.d.ts +10 -0
- package/dist/chart-flow.js +298 -0
- package/dist/chart-format.d.ts +18 -0
- package/dist/chart-format.js +65 -0
- package/dist/chart-grid.d.ts +8 -0
- package/dist/chart-grid.js +190 -0
- package/dist/chart-hierarchy.d.ts +17 -0
- package/dist/chart-hierarchy.js +146 -0
- package/dist/chart-indicators.d.ts +115 -0
- package/dist/chart-indicators.js +389 -0
- package/dist/chart-messages.d.ts +95 -0
- package/dist/chart-messages.js +92 -0
- package/dist/chart-motion.d.ts +16 -0
- package/dist/chart-motion.js +141 -0
- package/dist/chart-panel-messages.d.ts +265 -0
- package/dist/chart-panel-messages.js +285 -0
- package/dist/chart-pivot.d.ts +87 -0
- package/dist/chart-pivot.js +156 -0
- package/dist/chart-polar.d.ts +25 -0
- package/dist/chart-polar.js +700 -0
- package/dist/chart-samples.d.ts +16 -0
- package/dist/chart-samples.js +153 -0
- package/dist/chart-scale.d.ts +113 -0
- package/dist/chart-scale.js +405 -0
- package/dist/chart-stats.d.ts +111 -0
- package/dist/chart-stats.js +419 -0
- package/dist/chart-stream.d.ts +45 -0
- package/dist/chart-stream.js +91 -0
- package/dist/chart-summary.d.ts +27 -0
- package/dist/chart-summary.js +205 -0
- package/dist/chart-sync.svelte.d.ts +32 -0
- package/dist/chart-sync.svelte.js +23 -0
- package/dist/chart-table.d.ts +35 -0
- package/dist/chart-table.js +165 -0
- package/dist/chart-trend.d.ts +19 -0
- package/dist/chart-trend.js +61 -0
- package/dist/chart-types.d.ts +1456 -0
- package/dist/chart-types.js +6 -0
- package/dist/chart-validate.d.ts +43 -0
- package/dist/chart-validate.js +272 -0
- package/dist/chart-zoom.d.ts +40 -0
- package/dist/chart-zoom.js +145 -0
- package/dist/chart.d.ts +186 -865
- package/dist/chart.js +460 -2204
- package/dist/clipboard.d.ts +1 -0
- package/dist/clipboard.js +137 -18
- package/dist/column-resize.d.ts +3 -0
- package/dist/column-resize.js +4 -1
- package/dist/columns.js +3 -0
- package/dist/command-context.d.ts +19 -0
- package/dist/command-context.js +116 -0
- package/dist/core.d.ts +7 -0
- package/dist/core.js +36 -13
- package/dist/createPopoverSelect.svelte.d.ts +2 -2
- package/dist/editing.d.ts +2 -8
- package/dist/editing.js +272 -33
- package/dist/fill-patterns.d.ts +0 -5
- package/dist/fill-patterns.js +56 -2
- package/dist/grid-icons.d.ts +2 -2
- package/dist/grid-icons.js +2 -2
- package/dist/grid-messages.d.ts +12 -3
- package/dist/grid-messages.js +7 -0
- package/dist/history.d.ts +83 -0
- package/dist/history.js +133 -0
- package/dist/index.d.ts +27 -10
- package/dist/index.js +22 -5
- package/dist/keyboard-handlers.js +88 -31
- package/dist/keyboard.d.ts +55 -0
- package/dist/keyboard.js +132 -0
- package/dist/menus.d.ts +3 -1
- package/dist/menus.js +7 -2
- package/dist/merges.d.ts +97 -0
- package/dist/merges.js +147 -0
- package/dist/row-model.d.ts +133 -0
- package/dist/row-model.js +16 -0
- package/dist/row-resize.d.ts +3 -0
- package/dist/row-resize.js +14 -0
- package/dist/scroll-sync.d.ts +1 -0
- package/dist/scroll-sync.js +24 -0
- package/dist/selection.d.ts +18 -1
- package/dist/selection.js +138 -18
- package/dist/server-block-cache.d.ts +214 -0
- package/dist/server-block-cache.js +531 -0
- package/dist/server-data-source.d.ts +240 -6
- package/dist/server-data-source.js +220 -20
- package/dist/server.d.ts +13 -0
- package/dist/server.js +13 -0
- package/dist/shortcut-registry.d.ts +145 -0
- package/dist/shortcut-registry.js +44 -0
- package/dist/svgrid-wrapper.types.d.ts +213 -22
- package/dist/validate.d.ts +2 -0
- package/dist/validate.js +8 -3
- package/dist/virtualization/virtualizer.js +38 -17
- package/package.json +11 -1
- package/src/GridMenus.svelte +44 -2
- package/src/SvChartMenu.svelte +69 -0
- package/src/SvChartPanes.svelte +113 -0
- package/src/SvChartPanes.test.ts +66 -0
- package/src/SvGrid.controller.svelte.ts +818 -179
- package/src/SvGrid.css +178 -2
- package/src/SvGrid.svelte +467 -516
- package/src/SvGrid.types.ts +293 -11
- package/src/SvGridCellEditor.svelte +17 -0
- package/src/SvGridChart.svelte +2257 -329
- package/src/SvGridChart.test.ts +1419 -1
- package/src/SvGridChart.types.ts +336 -0
- package/src/SvGridChartBuilder.svelte +323 -0
- package/src/SvGridChartPanel.svelte +221 -275
- package/src/SvGridChartPickers.svelte +417 -0
- package/src/SvGridChartView.svelte +13 -14
- package/src/SvModal.svelte +7 -1
- package/src/SvModal.test.ts +9 -0
- package/src/ai.test.ts +57 -2
- package/src/ai.ts +166 -22
- package/src/aria.d.ts +11 -0
- package/src/build-api.coverage.test.ts +184 -0
- package/src/build-api.ts +118 -22
- package/src/chart-axes.test.ts +573 -0
- package/src/chart-axes.ts +342 -0
- package/src/chart-cartesian.ts +1863 -0
- package/src/chart-decimate.test.ts +249 -0
- package/src/chart-decimate.ts +186 -0
- package/src/chart-export-pdf.test.ts +91 -0
- package/src/chart-export-pdf.ts +207 -0
- package/src/chart-export.test.ts +14 -0
- package/src/chart-export.ts +13 -3
- package/src/chart-financial.ts +208 -0
- package/src/chart-flow.ts +286 -0
- package/src/chart-format.ts +67 -0
- package/src/chart-grid.ts +179 -0
- package/src/chart-hierarchy.ts +135 -0
- package/src/chart-indicators.test.ts +443 -0
- package/src/chart-indicators.ts +384 -0
- package/src/chart-messages.test.ts +21 -0
- package/src/chart-messages.ts +184 -0
- package/src/chart-motion.test.ts +71 -0
- package/src/chart-motion.ts +148 -0
- package/src/chart-panel-messages.test.ts +29 -0
- package/src/chart-panel-messages.ts +550 -0
- package/src/chart-pivot.test.ts +54 -0
- package/src/chart-pivot.ts +225 -0
- package/src/chart-polar.ts +674 -0
- package/src/chart-samples.ts +106 -0
- package/src/chart-scale.ts +394 -0
- package/src/chart-series-types.test.ts +714 -0
- package/src/chart-stats.ts +409 -0
- package/src/chart-stream.test.ts +75 -0
- package/src/chart-stream.ts +114 -0
- package/src/chart-summary.test.ts +90 -0
- package/src/chart-summary.ts +197 -0
- package/src/chart-sync.svelte.ts +41 -0
- package/src/chart-table.test.ts +76 -0
- package/src/chart-table.ts +178 -0
- package/src/chart-trend.ts +47 -0
- package/src/chart-types.ts +1309 -0
- package/src/chart-validate.test.ts +100 -0
- package/src/chart-validate.ts +247 -0
- package/src/chart-zoom.test.ts +137 -0
- package/src/chart-zoom.ts +124 -0
- package/src/chart.coverage.test.ts +81 -0
- package/src/chart.test.ts +56 -3
- package/src/chart.ts +557 -2784
- package/src/clipboard.test.ts +151 -0
- package/src/clipboard.ts +145 -16
- package/src/column-resize.ts +7 -1
- package/src/columns.ts +2 -0
- package/src/command-context.test.ts +200 -0
- package/src/command-context.ts +137 -0
- package/src/core.rowmodel-cache.test.ts +51 -0
- package/src/core.ts +40 -12
- package/src/editing.test.ts +281 -3
- package/src/editing.ts +264 -38
- package/src/fill-patterns.test.ts +35 -0
- package/src/fill-patterns.ts +56 -2
- package/src/grid-icons.ts +2 -2
- package/src/grid-messages.ts +21 -3
- package/src/history.test.ts +196 -0
- package/src/history.ts +162 -0
- package/src/icon-seam.test.ts +5 -6
- package/src/index.ts +169 -12
- package/src/keyboard-handlers.coverage.test.ts +126 -6
- package/src/keyboard-handlers.ts +91 -30
- package/src/keyboard-shortcuts.seam.test.ts +200 -0
- package/src/keyboard.test.ts +124 -1
- package/src/keyboard.ts +142 -0
- package/src/menus.test.ts +26 -0
- package/src/menus.ts +10 -3
- package/src/merges.test.ts +112 -0
- package/src/merges.ts +168 -0
- package/src/pivot.grid.test.ts +40 -5
- package/src/row-model.ts +146 -0
- package/src/row-resize.test.ts +44 -0
- package/src/row-resize.ts +17 -0
- package/src/scroll-sync.test.ts +42 -1
- package/src/scroll-sync.ts +25 -0
- package/src/selection.multi-range.test.ts +34 -0
- package/src/selection.test.ts +33 -2
- package/src/selection.ts +143 -21
- package/src/server-block-cache.test.ts +645 -0
- package/src/server-block-cache.ts +677 -0
- package/src/server-data-source.infinite.test.ts +343 -0
- package/src/server-data-source.ts +450 -27
- package/src/server.ts +47 -0
- package/src/shortcut-registry.test.ts +97 -0
- package/src/shortcut-registry.ts +181 -0
- package/src/svgrid-wrapper.types.ts +184 -13
- package/src/svgrid.behavior.test.ts +135 -0
- package/src/svgrid.charting.test.ts +513 -3
- package/src/svgrid.context-menu.test.ts +31 -0
- package/src/svgrid.new-features.wrapper.test.ts +10 -3
- package/src/svgrid.row-model-prop.svelte.test.ts +352 -0
- package/src/svgrid.row-model-seam.svelte.test.ts +289 -0
- package/src/validate.test.ts +10 -0
- package/src/validate.ts +10 -3
- package/src/virtualization/virtualizer.ts +39 -17
- package/dist/SvGroupCell.svelte +0 -141
- package/dist/SvGroupCell.svelte.d.ts +0 -49
- package/dist/SvRowGroupPanel.svelte +0 -186
- package/dist/SvRowGroupPanel.svelte.d.ts +0 -25
- package/dist/cdn/GridMenus-CHOMnW-c.js +0 -602
- package/dist/cdn/SvDateTimePicker-CCbDZNZB.js +0 -816
- package/dist/cdn/SvGridChart-1PMSp2LZ.js +0 -1481
- package/dist/cdn/SvGridChart-D02avhyr.js +0 -1480
- package/dist/cdn/SvGridChartPanel-DJnViOv4.js +0 -834
- package/dist/cdn/SvGridChartPanel-vPTNerFZ.js +0 -810
- package/dist/cdn/SvGridChartView-C--HhdUo.js +0 -56
- package/dist/cdn/SvGridChartView-KyyFG-wY.js +0 -55
- package/dist/cdn/chart-DLg3_zTQ.js +0 -1652
- package/dist/cdn/validate-_CDJzgIo.js +0 -75
- package/dist/server-group-model.d.ts +0 -98
- package/dist/server-group-model.js +0 -263
- package/src/SvGroupCell.svelte +0 -141
- package/src/SvRowGroupPanel.svelte +0 -186
- package/src/server-group-model.test.ts +0 -294
- package/src/server-group-model.ts +0 -370
package/dist/SvGrid.types.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
+
import type { GridRowModel } from "./row-model.js";
|
|
2
3
|
import type { CellEditorType, ColumnDef, RowData, SvGridApi, TableFeatures } from "./index.js";
|
|
3
4
|
import type { ConditionalFormat } from "./conditional-formatting.js";
|
|
4
5
|
import type { GroupDisplayType } from "./group-display.js";
|
|
5
6
|
import type { GridMessages } from "./grid-messages.js";
|
|
7
|
+
import type { ChartMessages } from "./chart-messages.js";
|
|
6
8
|
import type { GridIconName, GridIcons } from "./grid-icons.js";
|
|
7
9
|
import type { GridPivotConfig } from "./pivot-view.svelte.js";
|
|
8
10
|
import type { GridPredicateExpr } from "./filtering/predicate-expr.js";
|
|
@@ -52,7 +54,18 @@ export type SchedulerResource = {
|
|
|
52
54
|
}>;
|
|
53
55
|
}>;
|
|
54
56
|
};
|
|
55
|
-
import type { ChartType, ChartSpec, ChartAnnotation, ChartReferenceLine, ChartValueFormat } from "./chart.js";
|
|
57
|
+
import type { ChartType, ChartSpec, ChartAnnotation, ChartReducer, ChartReferenceLine, ChartValueFormat } from "./chart.js";
|
|
58
|
+
import type { ChartRangePreset } from "./chart-zoom.js";
|
|
59
|
+
import type { ChartAnimateConfig, ChartContextTarget, ChartZoomConfig } from "./SvGridChart.types.js";
|
|
60
|
+
/** What the chart panel's lifecycle events carry. */
|
|
61
|
+
export type ChartPanelInfo = {
|
|
62
|
+
/** Tab index in the panel's strip. */
|
|
63
|
+
index: number;
|
|
64
|
+
title: string;
|
|
65
|
+
type: ChartType;
|
|
66
|
+
/** The spec the panel is rendering, or null while it cannot build one. */
|
|
67
|
+
spec: ChartSpec | null;
|
|
68
|
+
};
|
|
56
69
|
/** One aggregated bucket returned by a server-side `getAggregate`. */
|
|
57
70
|
export type ChartAggregateBucket = {
|
|
58
71
|
category: string;
|
|
@@ -64,7 +77,7 @@ export type ChartAggregateRequest = {
|
|
|
64
77
|
dimension: string | undefined;
|
|
65
78
|
measure: string | null;
|
|
66
79
|
series?: string;
|
|
67
|
-
reduce:
|
|
80
|
+
reduce: ChartReducer;
|
|
68
81
|
filterModel: Record<string, unknown>;
|
|
69
82
|
};
|
|
70
83
|
/**
|
|
@@ -91,7 +104,7 @@ export type ChartingConfig<TData extends RowData = RowData> = {
|
|
|
91
104
|
series?: string;
|
|
92
105
|
/** Measure column, or several for a multi-series chart. */
|
|
93
106
|
measures?: string | string[];
|
|
94
|
-
reduce?:
|
|
107
|
+
reduce?: ChartReducer;
|
|
95
108
|
stacked?: boolean;
|
|
96
109
|
stacked100?: boolean;
|
|
97
110
|
/** Per-series-label type override (combo). */
|
|
@@ -100,7 +113,10 @@ export type ChartingConfig<TData extends RowData = RowData> = {
|
|
|
100
113
|
seriesAxes?: Record<string, "left" | "right">;
|
|
101
114
|
referenceLines?: ChartReferenceLine[];
|
|
102
115
|
averageLine?: boolean;
|
|
103
|
-
|
|
116
|
+
/** An overlay on every series: a 7-point moving average, or a regression
|
|
117
|
+
* (`linear`, `poly` for a quadratic, `exp`, `log`, `power`) whose
|
|
118
|
+
* R-squared the tooltip reads. */
|
|
119
|
+
trend?: "sma" | "ema" | "linear" | "poly" | "exp" | "log" | "power";
|
|
104
120
|
annotations?: ChartAnnotation[];
|
|
105
121
|
yScale?: "linear" | "log";
|
|
106
122
|
timeAxis?: boolean;
|
|
@@ -121,10 +137,37 @@ export type ChartingConfig<TData extends RowData = RowData> = {
|
|
|
121
137
|
otherLabel?: string;
|
|
122
138
|
sort?: "value-desc" | "value-asc" | "category" | "none";
|
|
123
139
|
dataLabels?: boolean;
|
|
124
|
-
zoom
|
|
140
|
+
/** Zooming: `true` for drag-to-zoom, or an object choosing wheel, pinch,
|
|
141
|
+
* pan and the axes (see `ChartZoomConfig`). The window survives tab
|
|
142
|
+
* switches and round-trips through `getChartsState`. */
|
|
143
|
+
zoom?: boolean | ChartZoomConfig;
|
|
125
144
|
brush?: boolean;
|
|
145
|
+
/** Range buttons (1W / 1M / 3M / 6M / YTD / 1Y / All, or your own) when the
|
|
146
|
+
* dimension is a date. */
|
|
147
|
+
rangePresets?: boolean | ChartRangePreset[];
|
|
148
|
+
/** Share crosshair and zoom with other charts on the page (any `SvChart`
|
|
149
|
+
* with the same `syncGroup`). */
|
|
150
|
+
syncGroup?: string;
|
|
151
|
+
/** All chart tabs of this grid share one zoom window: zoom in one tab and
|
|
152
|
+
* the others open at the same range. */
|
|
153
|
+
syncTabs?: boolean;
|
|
154
|
+
/** Right-click menu on the chart: `true` for the built-in items, your own
|
|
155
|
+
* `MenuItem`s appended after them, or a function of the clicked point. */
|
|
156
|
+
contextMenu?: boolean | MenuItem[] | ((target: ChartContextTarget) => MenuItem[]);
|
|
157
|
+
/** Motion: `true` for the default data-update tween, or an object choosing
|
|
158
|
+
* the enter effect and duration. */
|
|
159
|
+
animate?: boolean | ChartAnimateConfig;
|
|
160
|
+
/** Translations for the chart's own strings (toolbar, menu, legend hints,
|
|
161
|
+
* what it says to assistive technology); the panel passes them to every
|
|
162
|
+
* chart it draws. See `ChartMessages`. */
|
|
163
|
+
localeText?: Partial<ChartMessages>;
|
|
126
164
|
/** Show the chart's PNG/SVG export toolbar. */
|
|
127
165
|
export?: boolean;
|
|
166
|
+
/** A chart tab was added (the first one counts, once the panel opens). */
|
|
167
|
+
onChartCreated?: (info: ChartPanelInfo) => void;
|
|
168
|
+
/** The active chart's spec changed: a picker, the builder, a filter, an
|
|
169
|
+
* edit, new rows. Debounced to one call per burst of changes. */
|
|
170
|
+
onChartChanged?: (info: ChartPanelInfo) => void;
|
|
128
171
|
/** Escape hatch: build a fully custom ChartSpec from the (scoped) rows. */
|
|
129
172
|
buildSpec?: (rows: TData[]) => ChartSpec | null;
|
|
130
173
|
/** Server-side aggregation: chart the whole dataset, not just loaded rows. */
|
|
@@ -189,15 +232,44 @@ export type ContextMenuTarget<TData extends RowData = RowData> = {
|
|
|
189
232
|
* "chart"`. The `"chart"` item (chart the selected range) is only shown when
|
|
190
233
|
* `charting` is enabled; it is appended to the default menu automatically.
|
|
191
234
|
*/
|
|
235
|
+
/**
|
|
236
|
+
* An icon of your own for a context-menu item: path data on a 16 x 16 grid,
|
|
237
|
+
* drawn in the text colour with a 1.4px round stroke (`fill` for a solid
|
|
238
|
+
* part, `width` and `dash` to vary the stroke). The same shape a
|
|
239
|
+
* spreadsheet ribbon's icon set uses, so one set serves both.
|
|
240
|
+
*/
|
|
241
|
+
export type ContextMenuIcon = {
|
|
242
|
+
paths: ReadonlyArray<{
|
|
243
|
+
d: string;
|
|
244
|
+
fill?: boolean;
|
|
245
|
+
width?: number;
|
|
246
|
+
dash?: string;
|
|
247
|
+
}>;
|
|
248
|
+
};
|
|
192
249
|
export type ContextMenuItem<TData extends RowData = RowData> = string | {
|
|
193
250
|
key: string;
|
|
194
|
-
|
|
251
|
+
/**
|
|
252
|
+
* The text. An object whose `key` names a built-in (`copy`, `cut`,
|
|
253
|
+
* `paste`, `clear`, `row_above`, `row_below`, `remove_row`,
|
|
254
|
+
* `remove_col`, `comment`, `chart`) keeps the built-in's own label
|
|
255
|
+
* when this is omitted.
|
|
256
|
+
*/
|
|
257
|
+
label?: string;
|
|
258
|
+
/**
|
|
259
|
+
* A glyph before the label: one of the grid's icons by name, or path
|
|
260
|
+
* data of your own. Items without one keep the gutter, so the labels
|
|
261
|
+
* line up.
|
|
262
|
+
*/
|
|
263
|
+
icon?: GridIconName | ContextMenuIcon;
|
|
195
264
|
/** Hide the item entirely for this target. */
|
|
196
265
|
hidden?: (target: ContextMenuTarget<TData>) => boolean;
|
|
197
266
|
/** Render the item greyed-out and non-clickable for this target. */
|
|
198
267
|
disabled?: (target: ContextMenuTarget<TData>) => boolean;
|
|
199
|
-
/**
|
|
200
|
-
|
|
268
|
+
/**
|
|
269
|
+
* Invoked on click. The menu closes afterwards. Omit it on a built-in
|
|
270
|
+
* key to keep what the built-in does and only give it an icon.
|
|
271
|
+
*/
|
|
272
|
+
action?: (target: ContextMenuTarget<TData>) => void;
|
|
201
273
|
};
|
|
202
274
|
/** What a {@link SelectionBarAction} is handed when it runs. */
|
|
203
275
|
export type SelectionBarTarget<TData extends RowData = RowData> = {
|
|
@@ -377,7 +449,7 @@ export type ChartViewConfig<TFeatures extends TableFeatures = TableFeatures, TDa
|
|
|
377
449
|
/** Pivot dimension: one series per distinct value of this field. */
|
|
378
450
|
series?: keyof TData & string;
|
|
379
451
|
/** Aggregation when several rows share a category. Default `'sum'`. */
|
|
380
|
-
reduce?:
|
|
452
|
+
reduce?: ChartReducer;
|
|
381
453
|
/** Stack bar / area series instead of grouping them. */
|
|
382
454
|
stacked?: boolean;
|
|
383
455
|
/** Stack to 100% (implies `stacked`). */
|
|
@@ -1004,7 +1076,13 @@ export type SchedulerConfig<TFeatures extends TableFeatures = TableFeatures, TDa
|
|
|
1004
1076
|
searchPlaceholder?: string;
|
|
1005
1077
|
};
|
|
1006
1078
|
export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends RowData = RowData> = {
|
|
1007
|
-
|
|
1079
|
+
/**
|
|
1080
|
+
* The rows to render.
|
|
1081
|
+
*
|
|
1082
|
+
* Optional only because `rowModel` can supply them instead; a grid with
|
|
1083
|
+
* neither renders empty. When both are present `data` wins.
|
|
1084
|
+
*/
|
|
1085
|
+
data?: ReadonlyArray<TData>;
|
|
1008
1086
|
columns: Array<ColumnDef<TFeatures, TData>>;
|
|
1009
1087
|
/**
|
|
1010
1088
|
* Kanban board mode. When set, the grid renders its rows as cards in
|
|
@@ -1516,6 +1594,23 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1516
1594
|
* that leaves this off never fetches that code.
|
|
1517
1595
|
*/
|
|
1518
1596
|
columnResize?: boolean;
|
|
1597
|
+
/**
|
|
1598
|
+
* The user dragged a column's edge (or double-clicked it to autosize).
|
|
1599
|
+
* Programmatic `api.setColumnWidth` does not fire it.
|
|
1600
|
+
*/
|
|
1601
|
+
onColumnResize?: (event: {
|
|
1602
|
+
columnId: string;
|
|
1603
|
+
width: number;
|
|
1604
|
+
}) => void;
|
|
1605
|
+
/**
|
|
1606
|
+
* The user dragged a row's edge, or double-clicked it: `height` is then
|
|
1607
|
+
* `null`, the row back at its declared height. Programmatic
|
|
1608
|
+
* `api.setRowHeight` does not fire it.
|
|
1609
|
+
*/
|
|
1610
|
+
onRowResize?: (event: {
|
|
1611
|
+
rowIndex: number;
|
|
1612
|
+
height: number | null;
|
|
1613
|
+
}) => void;
|
|
1519
1614
|
/**
|
|
1520
1615
|
* Make the grid usable on narrow screens. When the grid's own width drops
|
|
1521
1616
|
* below the breakpoint (default `640`px), pinned columns are un-pinned so the
|
|
@@ -1580,6 +1675,25 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1580
1675
|
* currency symbols, expand codes to labels, or redact. Receives the display
|
|
1581
1676
|
* value plus the row/column context; return the string (or value) to copy.
|
|
1582
1677
|
*/
|
|
1678
|
+
/**
|
|
1679
|
+
* Decide what the fill handle writes into one cell, ahead of the grid's
|
|
1680
|
+
* own pattern rules (series, weekdays, "Item 1"). Receives the source
|
|
1681
|
+
* cell's value and how far the target sits from it; return the value to
|
|
1682
|
+
* write, or `undefined` to let the pattern decide. A spreadsheet uses it
|
|
1683
|
+
* to move a formula's references by the distance filled, which the
|
|
1684
|
+
* pattern rules would otherwise mangle ("=A1+B1" reads as "Item 1").
|
|
1685
|
+
*/
|
|
1686
|
+
processCellForFill?: (params: {
|
|
1687
|
+
/** The source cell's value the target cycles back to. */
|
|
1688
|
+
value: unknown;
|
|
1689
|
+
/** Rows and columns from that source cell to the target. */
|
|
1690
|
+
delta: {
|
|
1691
|
+
rows: number;
|
|
1692
|
+
cols: number;
|
|
1693
|
+
};
|
|
1694
|
+
rowIndex: number;
|
|
1695
|
+
columnId: string;
|
|
1696
|
+
}) => unknown;
|
|
1583
1697
|
processCellForClipboard?: (params: {
|
|
1584
1698
|
value: unknown;
|
|
1585
1699
|
column: unknown;
|
|
@@ -1587,6 +1701,65 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1587
1701
|
rowIndex: number;
|
|
1588
1702
|
columnId: string;
|
|
1589
1703
|
}) => unknown;
|
|
1704
|
+
/**
|
|
1705
|
+
* An HTML rendering of what Ctrl+C copies, written to the clipboard as
|
|
1706
|
+
* `text/html` beside the TSV. Excel and Google Sheets read the HTML
|
|
1707
|
+
* first, so a table with inline styles pastes into them with its formats,
|
|
1708
|
+
* and the same markup can carry what the text cannot (a formula in a
|
|
1709
|
+
* `data-` attribute) for a round trip back into a grid that reads it.
|
|
1710
|
+
* Called after every cell has been through `processCellForClipboard`,
|
|
1711
|
+
* with the rectangles copied and the text about to be written. Return
|
|
1712
|
+
* nothing to write text alone. Runs synchronously inside the key press,
|
|
1713
|
+
* which is what the clipboard needs.
|
|
1714
|
+
*/
|
|
1715
|
+
clipboardHtml?: (params: {
|
|
1716
|
+
rects: ReadonlyArray<{
|
|
1717
|
+
minRow: number;
|
|
1718
|
+
maxRow: number;
|
|
1719
|
+
minCol: number;
|
|
1720
|
+
maxCol: number;
|
|
1721
|
+
}>;
|
|
1722
|
+
text: string;
|
|
1723
|
+
}) => string | null | undefined;
|
|
1724
|
+
/**
|
|
1725
|
+
* Take over a paste. Receives the clipboard's `text/plain` and, when the
|
|
1726
|
+
* source put one there, its `text/html` (Excel's carries formats and
|
|
1727
|
+
* formulas; a grid's own `clipboardHtml` carries whatever it chose to).
|
|
1728
|
+
* Return `true` to say the paste was applied; anything else lets the grid
|
|
1729
|
+
* paste the text as it always has. Runs inside one history group, so
|
|
1730
|
+
* every `setCellValue` and `recordUndo` the handler makes is one Ctrl+Z.
|
|
1731
|
+
*
|
|
1732
|
+
* With this set, Ctrl+V lets the browser's own `paste` event through
|
|
1733
|
+
* (that is where the unsanitised HTML is), and the async Clipboard API is
|
|
1734
|
+
* the fallback for a browser that does not deliver it. `source` says
|
|
1735
|
+
* which path the payload came by.
|
|
1736
|
+
*/
|
|
1737
|
+
onPasteClipboard?: (payload: {
|
|
1738
|
+
text: string;
|
|
1739
|
+
html: string | null;
|
|
1740
|
+
source: "event" | "async";
|
|
1741
|
+
}) => boolean | void;
|
|
1742
|
+
/**
|
|
1743
|
+
* Transform each cell on its way IN from the clipboard, before the grid
|
|
1744
|
+
* coerces it for the column's editor. Symmetric with
|
|
1745
|
+
* `processCellForClipboard`: the pair is what lets a round trip survive.
|
|
1746
|
+
*
|
|
1747
|
+
* Receives the raw clipboard text for the cell plus where it is landing.
|
|
1748
|
+
* Return the value to write, or `undefined` to leave the cell untouched.
|
|
1749
|
+
*
|
|
1750
|
+
* This is also the seam a feature pack uses to take over a paste entirely:
|
|
1751
|
+
* `@svgrid/enterprise`'s paste-special reads the clipboard's `text/html`
|
|
1752
|
+
* for formats and formulas and writes through here.
|
|
1753
|
+
*/
|
|
1754
|
+
processCellFromClipboard?: (params: {
|
|
1755
|
+
/** The raw text from the clipboard for this cell. */
|
|
1756
|
+
text: string;
|
|
1757
|
+
/** What the grid would have written after its own coercion. */
|
|
1758
|
+
parsedValue: unknown;
|
|
1759
|
+
row: TData;
|
|
1760
|
+
rowIndex: number;
|
|
1761
|
+
columnId: string;
|
|
1762
|
+
}) => unknown;
|
|
1590
1763
|
/**
|
|
1591
1764
|
* Inline cell editing: F2 or double-click opens an editor in the active cell,
|
|
1592
1765
|
* Enter commits, Esc cancels. Off by default.
|
|
@@ -1596,6 +1769,14 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1596
1769
|
* `editable` is the shortcut alias and wins over this.
|
|
1597
1770
|
*/
|
|
1598
1771
|
enableInlineEditing?: boolean;
|
|
1772
|
+
/**
|
|
1773
|
+
* A click on the cell that is already active opens its editor, the way a
|
|
1774
|
+
* second click on a selected file name starts renaming it. On by default.
|
|
1775
|
+
* A spreadsheet turns it off: Excel edits on double-click or F2 only, and
|
|
1776
|
+
* a user clicking the cell they are on to get back to it after a dialog
|
|
1777
|
+
* would otherwise find the next shortcut typed into an editor.
|
|
1778
|
+
*/
|
|
1779
|
+
editOnSecondClick?: boolean;
|
|
1599
1780
|
/**
|
|
1600
1781
|
* Full-row editing. When `true`, starting an edit puts the WHOLE row into
|
|
1601
1782
|
* edit mode - every editable cell shows an inline editor at once - and a
|
|
@@ -1904,6 +2085,99 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1904
2085
|
scrollHeight: number;
|
|
1905
2086
|
clientHeight: number;
|
|
1906
2087
|
}) => void;
|
|
2088
|
+
/**
|
|
2089
|
+
* Fires when the range of rows on screen changes, with the first and last
|
|
2090
|
+
* row INDEX (not pixels). Coalesced to one call per frame, so it is cheap
|
|
2091
|
+
* to wire to something that fetches.
|
|
2092
|
+
*
|
|
2093
|
+
* This is the hook a block-loading data source needs and
|
|
2094
|
+
* `onScrollBottomReached` cannot give it: "the user is looking at rows
|
|
2095
|
+
* 4,000-4,020" answers which block to fetch and which to keep, while
|
|
2096
|
+
* "they hit the bottom" only ever means "append more". Both are free; use
|
|
2097
|
+
* this one with `createServerDataSource({ mode: 'infinite' })`, or let
|
|
2098
|
+
* `rowModel` wire it for you.
|
|
2099
|
+
*
|
|
2100
|
+
* Reports `0, data.length - 1` when virtualization is off, since every row
|
|
2101
|
+
* really is rendered.
|
|
2102
|
+
*/
|
|
2103
|
+
onVisibleRangeChange?: (range: {
|
|
2104
|
+
startIndex: number;
|
|
2105
|
+
endIndex: number;
|
|
2106
|
+
}) => void;
|
|
2107
|
+
/**
|
|
2108
|
+
* Marks a row as one whose data has not arrived: `"loading"` draws a
|
|
2109
|
+
* shimmer in every cell, `"failed"` draws a full-width "could not load"
|
|
2110
|
+
* row with a Retry button, and `null` (the default for every row) renders
|
|
2111
|
+
* normally.
|
|
2112
|
+
*
|
|
2113
|
+
* Placeholder rows are inert - not selectable, not editable, and skipped
|
|
2114
|
+
* by cell navigation - because there is nothing there to act on yet.
|
|
2115
|
+
*
|
|
2116
|
+
* `createServerDataSource` in `infinite` mode fills the gaps with rows this
|
|
2117
|
+
* recognises, so the usual wiring is `rowPlaceholder={rowPlaceholderState}`
|
|
2118
|
+
* (or nothing at all, via `rowModel`).
|
|
2119
|
+
*/
|
|
2120
|
+
rowPlaceholder?: (row: TData, rowIndex: number) => "loading" | "failed" | null;
|
|
2121
|
+
/** Called by the Retry button on a `"failed"` placeholder row. */
|
|
2122
|
+
onRetryRow?: (row: TData, rowIndex: number) => void;
|
|
2123
|
+
/**
|
|
2124
|
+
* Hand selection over to an external model.
|
|
2125
|
+
*
|
|
2126
|
+
* The grid normally tracks selection as a record of the row ids it has
|
|
2127
|
+
* seen, which is right until the rows it has seen are a window onto a
|
|
2128
|
+
* million on a server: "select all" then means 20 ticked checkboxes rather
|
|
2129
|
+
* than a million, and the header checkbox cannot honestly say `all`. A
|
|
2130
|
+
* model that stores the RULE ("everything except these three") can answer
|
|
2131
|
+
* both, so when this is set the header checkbox, the row checkboxes and
|
|
2132
|
+
* `api.selectAllRows()` all route through it instead.
|
|
2133
|
+
*
|
|
2134
|
+
* `@svgrid/enterprise` ships one for the server-side row model; this is the
|
|
2135
|
+
* seam it plugs into.
|
|
2136
|
+
*/
|
|
2137
|
+
/**
|
|
2138
|
+
* Drive the grid from a row model instead of wiring a dozen props.
|
|
2139
|
+
*
|
|
2140
|
+
* `createServerDataSource` returns one, and so does the Enterprise
|
|
2141
|
+
* server-side row model, so server-backed grids become:
|
|
2142
|
+
*
|
|
2143
|
+
* ```svelte
|
|
2144
|
+
* <SvGrid rowModel={ctl} {columns} />
|
|
2145
|
+
* ```
|
|
2146
|
+
*
|
|
2147
|
+
* The model supplies `data`, `loading`, `getRowId`, the external sort
|
|
2148
|
+
* and filter wiring, the visible range, placeholder rows, group
|
|
2149
|
+
* accessors, selection and paging - each one only if it implements that
|
|
2150
|
+
* part. A prop written explicitly on the grid always wins, so you can
|
|
2151
|
+
* adopt it and still override one piece.
|
|
2152
|
+
*/
|
|
2153
|
+
rowModel?: GridRowModel<TData>;
|
|
2154
|
+
/**
|
|
2155
|
+
* Columns that REPLACE `columns` while set. The server-side row model
|
|
2156
|
+
* supplies them in pivot mode - one column per pivoted value, grouped
|
|
2157
|
+
* under a header per pivot key - and clears them when pivot mode ends,
|
|
2158
|
+
* so `columns` stays the app's own list. Rarely set by hand.
|
|
2159
|
+
*/
|
|
2160
|
+
pivotResultColumns?: Array<ColumnDef<TFeatures, TData>> | null;
|
|
2161
|
+
rowSelectionModel?: {
|
|
2162
|
+
isSelected: (rowId: string, row: TData) => boolean;
|
|
2163
|
+
/** Whether the header checkbox shows empty, indeterminate, or ticked. */
|
|
2164
|
+
headerState: () => "none" | "some" | "all";
|
|
2165
|
+
toggle: (rowId: string, row: TData, next: boolean) => void;
|
|
2166
|
+
/** The header checkbox: select or clear everything, loaded or not. */
|
|
2167
|
+
toggleAll: (next: boolean) => void;
|
|
2168
|
+
/**
|
|
2169
|
+
* How many rows the rule selects, counting the ones the grid never
|
|
2170
|
+
* loaded; `null` when it cannot say. The selection bar shows this
|
|
2171
|
+
* instead of counting ticked rows on screen.
|
|
2172
|
+
*/
|
|
2173
|
+
selectedCount?: () => number | null;
|
|
2174
|
+
/**
|
|
2175
|
+
* Apply one patch to every selected row, loaded or not. When present,
|
|
2176
|
+
* the bulk-edit drawer sends its edits here instead of writing the
|
|
2177
|
+
* loaded cells. Resolves with how many rows changed.
|
|
2178
|
+
*/
|
|
2179
|
+
bulkUpdate?: (patch: Record<string, unknown>) => Promise<number>;
|
|
2180
|
+
};
|
|
1907
2181
|
/**
|
|
1908
2182
|
* Marks a row as an expandable "detail row". When this returns true the
|
|
1909
2183
|
* grid renders that row as a SINGLE full-width cell (colspan across every
|
|
@@ -1927,8 +2201,10 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1927
2201
|
* Server-side group / tree keyboard + accessibility, built into the grid. When
|
|
1928
2202
|
* set, the grid uses the treegrid role and marks matching rows with
|
|
1929
2203
|
* `aria-level` / `aria-expanded`, and ArrowRight / ArrowLeft expand / collapse
|
|
1930
|
-
* the focused group row (no app-level key handling). Pair with
|
|
1931
|
-
* + `SvGroupCell` for the visual
|
|
2204
|
+
* the focused group row (no app-level key handling). Pair with
|
|
2205
|
+
* `serverGroupRows` + `SvGroupCell` from `@svgrid/enterprise` for the visual
|
|
2206
|
+
* expander, or drive it from your own tree state. Every accessor receives the
|
|
2207
|
+
* row data.
|
|
1932
2208
|
*/
|
|
1933
2209
|
serverGroup?: {
|
|
1934
2210
|
/** Whether a row is an expandable group / branch. */
|
|
@@ -1957,6 +2233,33 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1957
2233
|
* main grid; field/format/cell/cellClass all apply.
|
|
1958
2234
|
*/
|
|
1959
2235
|
pinnedTopRows?: ReadonlyArray<TData>;
|
|
2236
|
+
/**
|
|
2237
|
+
* Freeze the first N rows: they stay under the header while the body
|
|
2238
|
+
* scrolls, and unlike `pinnedTopRows` they are the grid's own rows,
|
|
2239
|
+
* still editable, selectable and numbered as rows 1..N. Excel's Freeze
|
|
2240
|
+
* Panes, for the row half; the column half is `columnPinning`. Under
|
|
2241
|
+
* `virtualization` the frozen rows are always rendered and the window
|
|
2242
|
+
* skips them.
|
|
2243
|
+
*/
|
|
2244
|
+
frozenRows?: number;
|
|
2245
|
+
/**
|
|
2246
|
+
* Merged cells: rectangles drawn as one cell, a spreadsheet's Merge &
|
|
2247
|
+
* Center. Each entry is the top-left cell (display indices) and how many
|
|
2248
|
+
* rows and columns it covers. The origin's td takes the span and shows
|
|
2249
|
+
* the origin's value; the covered cells are not drawn, a selection grows
|
|
2250
|
+
* to whole merges, the active cell inside a merge is its origin, and the
|
|
2251
|
+
* arrow keys step over a merge as one cell. A merge that crosses the
|
|
2252
|
+
* frozen boundary or the rendered window is drawn in parts, one per
|
|
2253
|
+
* band. The grid does not write into covered cells on its own; a
|
|
2254
|
+
* consumer that merges cells keeps them empty or marks them read-only
|
|
2255
|
+
* through the column's `editable`.
|
|
2256
|
+
*/
|
|
2257
|
+
mergedCells?: ReadonlyArray<{
|
|
2258
|
+
rowIndex: number;
|
|
2259
|
+
colIndex: number;
|
|
2260
|
+
rowSpan: number;
|
|
2261
|
+
colSpan: number;
|
|
2262
|
+
}>;
|
|
1960
2263
|
/**
|
|
1961
2264
|
* Rows to pin to the BOTTOM of the grid - rendered below the regular
|
|
1962
2265
|
* rows and sticky-positioned (sticks to the bottom of the viewport
|
|
@@ -715,6 +715,23 @@
|
|
|
715
715
|
{@const _reg = getCellEditor(String(ctrl.editingCell?.editorType))!}
|
|
716
716
|
{@const CustomCellEditor = _reg.component}
|
|
717
717
|
<CustomCellEditor {...resolveEditorProps(_reg, buildRegisteredEditorContext())} />
|
|
718
|
+
{:else if (ctrl.editingCell?.editorType ?? "text") === "text" && column?.columnDef.editorMultiline}
|
|
719
|
+
<!-- The text editor with room for line breaks: Alt+Enter inserts one
|
|
720
|
+
(handled in onEditorKeyDown), Enter commits like the input's, and
|
|
721
|
+
the height follows the lines. -->
|
|
722
|
+
<textarea
|
|
723
|
+
use:focusOnMount
|
|
724
|
+
class="sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline"
|
|
725
|
+
rows={Math.max(1, String(ctrl.editingCell?.value ?? "").split("\n").length)}
|
|
726
|
+
value={String(ctrl.editingCell?.value ?? "")}
|
|
727
|
+
oninput={(event) => {
|
|
728
|
+
const area = event.currentTarget as HTMLTextAreaElement;
|
|
729
|
+
area.rows = Math.max(1, area.value.split("\n").length);
|
|
730
|
+
updateEditingCellValue(area.value);
|
|
731
|
+
}}
|
|
732
|
+
onblur={() => saveEditingCell()}
|
|
733
|
+
onkeydown={onEditorKeyDown}
|
|
734
|
+
></textarea>
|
|
718
735
|
{:else}
|
|
719
736
|
{@const editorType = ctrl.editingCell?.editorType ?? "text"}
|
|
720
737
|
{@const isNumberEditor = getCellEditorInputType(editorType) === "text" &&
|