pivotkit-react 0.0.0-stage → 0.1.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +300 -0
  2. package/LICENSE +21 -0
  3. package/README.md +327 -2
  4. package/dist/chunks/chunk-C32TYSHG.js +441 -0
  5. package/dist/chunks/chunk-ILHFIV2P.js +784 -0
  6. package/dist/chunks/chunk-KKJO36W5.js +1833 -0
  7. package/dist/chunks/chunk-XYP47DJ3.js +123 -0
  8. package/dist/echarts.js +262 -0
  9. package/dist/index.js +3390 -0
  10. package/dist/labels.js +12 -0
  11. package/dist/menus.js +1085 -0
  12. package/dist/styles.css +2447 -0
  13. package/package.json +70 -4
  14. package/types/PivotReport.d.ts +20 -0
  15. package/types/all-labels.d.ts +5 -0
  16. package/types/chart-decorate.d.ts +16 -0
  17. package/types/chart-options.d.ts +23 -0
  18. package/types/chart-summary.d.ts +12 -0
  19. package/types/chart-tooltip.d.ts +38 -0
  20. package/types/chart-types.d.ts +152 -0
  21. package/types/chart.d.ts +39 -0
  22. package/types/chip-menus.d.ts +32 -0
  23. package/types/clear-input.d.ts +20 -0
  24. package/types/dnd-moves.d.ts +45 -0
  25. package/types/dnd.d.ts +101 -0
  26. package/types/dom.d.ts +52 -0
  27. package/types/drill-export.d.ts +42 -0
  28. package/types/drill-panel.d.ts +39 -0
  29. package/types/drill.d.ts +62 -0
  30. package/types/echarts.d.ts +4 -0
  31. package/types/export-run.d.ts +59 -0
  32. package/types/field-info.d.ts +34 -0
  33. package/types/fields.d.ts +32 -0
  34. package/types/files.d.ts +27 -0
  35. package/types/filter.d.ts +21 -0
  36. package/types/icons.d.ts +76 -0
  37. package/types/index.d.ts +536 -0
  38. package/types/info.d.ts +34 -0
  39. package/types/iso.d.ts +2 -0
  40. package/types/labels.d.ts +721 -0
  41. package/types/lazy-menus.d.ts +16 -0
  42. package/types/menu-labels.d.ts +255 -0
  43. package/types/menus.d.ts +7 -0
  44. package/types/names.d.ts +80 -0
  45. package/types/numbers.d.ts +13 -0
  46. package/types/overflow.d.ts +59 -0
  47. package/types/place.d.ts +43 -0
  48. package/types/popover.d.ts +89 -0
  49. package/types/rove.d.ts +20 -0
  50. package/types/section.d.ts +42 -0
  51. package/types/share.d.ts +123 -0
  52. package/types/skeleton.d.ts +9 -0
  53. package/types/storage.d.ts +24 -0
  54. package/types/table.d.ts +23 -0
  55. package/types/templates.d.ts +40 -0
  56. package/types/theme.d.ts +24 -0
  57. package/types/tip-list.d.ts +20 -0
  58. package/types/tips.d.ts +298 -0
  59. package/types/toasts.d.ts +26 -0
  60. package/types/toolbar-panels.d.ts +90 -0
  61. package/types/toolbar.d.ts +5 -0
  62. package/types/use-big-result.d.ts +29 -0
  63. package/types/use-export.d.ts +7 -0
  64. package/types/use-theme.d.ts +11 -0
  65. package/types/use-view-history.d.ts +34 -0
  66. package/types/version.d.ts +2 -0
  67. package/types/view-history.d.ts +89 -0
  68. package/types/view-ops.d.ts +344 -0
  69. package/types/view-store.d.ts +52 -0
  70. package/types/virtual.d.ts +44 -0
  71. package/types/zones.d.ts +42 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,300 @@
1
+ # Changelog
2
+
3
+ All notable changes to `pivotkit-react` are documented in this file. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this package adheres to
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ### Changed
10
+
11
+ - The forms of a row or column field's menu (number ranges, Top N, value condition) remove what
12
+ they set with **Remove** (was "Clear"; label key `removeSetting`, was `clear`), and Apply with an
13
+ empty number removes it too instead of asking for a number. One undo step, as before.
14
+ - The foot of a chip menu reads **Remove field** ("Feld entfernen"), so it is not mistaken for a
15
+ form's Remove.
16
+
17
+ ### Fixed
18
+
19
+ - A colour scale in the theme's colours (Highlight, "Colour scale") no longer shows "Some parts of the
20
+ view were not used" (pivotkit-core's normalize).
21
+
22
+ ## [0.1.0] - 2026-11-07
23
+
24
+ First release.
25
+
26
+ ### Added
27
+
28
+ - The Export menus (the toolbar's and the drill-down's) fold their sections Download and Copy
29
+ (`exportDownload`, `exportCopy`), remembered as the other sections. Copy table and the drill-down's
30
+ Copy say in their "i" and their note that the copy is tab-separated and pastes into Excel or Google
31
+ Sheets as columns. The status notes show above the drill-down panel, so its copies and exports are
32
+ seen. The popovers' layer is no longer inside a clipping box: the report's layout clips its content
33
+ instead of the report, so Safari no longer cuts a popover (the filter from the field list) at the
34
+ report's edge.
35
+ - The field list collapses to a rail of about 40 px (`--pk-rail-w`): « next to "Fields"
36
+ (`collapseFields`, `aria-expanded`), the rail with "Fields" upright (`expandFields`) and a search
37
+ button that opens the list with the focus in its search field; a chip dropped on the rail leaves
38
+ the report (the rail reads "Drop here to remove" while one is dragged); another `fieldList` value
39
+ is ignored with a console warning; the choice is kept with the tips (`-fields`); `fieldList` (`"open"`, `"collapsed"`)
40
+ starts it so. Not on a narrow report (the drawer); Enlarge hides it. The check and merge of
41
+ `chartOptions` and the report's marks on the chart's option load with ECharts
42
+ (`dist/echarts.js`), so the first load stays small; the `chartOptions` warning comes when the chart
43
+ is drawn.
44
+ - Templates in two groups of the Views menu, "Shared views" and "My views" (labels `sharedViews`,
45
+ `myViews`; "Gemeinsame Ansichten", "Meine Ansichten"), each shown only with entries ("My views"
46
+ also while people can save; `noViews` when there is nothing at all). `templates` entries take
47
+ `scope` (`"shared"` or `"user"`; without it a `deletable` entry is the user's own) and `file`, a
48
+ view file instead of `view` (its name the default). A shared entry that cannot be deleted has an
49
+ "i": "Only admins can change shared views." (`labels.settingInfo.sharedView`), where someone can
50
+ change shared views (a deletable shared entry, or Publish). Every name is plain text, at most 120
51
+ characters; a deletable entry without `scope` is listed under My views with a console warning once.
52
+ A published view is sent normalized against the data. `onSaveTemplate`
53
+ gets `{ scope: "user" }` and `onDeleteTemplate` `{ scope }`. `canPublish` with `onPublishTemplate`
54
+ offers "Publish as shared view" on the user's views, asked in place (`publishView`,
55
+ `publishConfirm`, `publishAction`, `toastPublished`, `toastPublishFailed`,
56
+ `toastPublishRejected`). After a delete, a publish or Cancel the focus goes back to the entry in
57
+ that place. `templateStore="browser"` keeps the user's views in localStorage
58
+ (`pivotkit:views:<storageKey>`) as view files per data (`source`), at most 100 views and 500,000
59
+ characters for a save (a delete is never refused; a text over the cap is not read), a delete
60
+ changed in another tab meanwhile refused (`storeChanged`), read after hydration, with a note that they stay in this browser (`storeNote`) and
61
+ the reasons a save is refused (`storeFull`, `storeTooLarge`, `storeRefused`); the host's
62
+ `onSaveTemplate` wins. The texts of save and delete (`toastSaved`, `toastDeleted`,
63
+ `toastSaveFailed`, `toastDeleteFailed`, `toastSaveRejected`, `toastDeleteRejected`) load with the
64
+ menus, as does the browser store with pivotkit-core/templates, so the first load stays small.
65
+ - The drill-down panel: Enlarge fills the report with it (Reduce or Escape brings it back, a second
66
+ Escape closes it; the focus stays on the button; not on a narrow report, not part of the view),
67
+ columns as wide as their content with a long text wrapping, and an Export menu: Copy (the rows as
68
+ shown, tab-separated with a header row, for a spreadsheet), Copy as JSON (field names and raw
69
+ values), Download CSV and Download Excel (pivotkit-core's rows exporters, the panel's formats, named
70
+ after the cell: "Central – Jul 2026"). With more rows behind the value than `drillDownLimit`, every
71
+ export holds the rows shown, and the menu and the note say so ("Copied 1,000 of 4,212 rows").
72
+ - Export, Copy table (the table as shown, tab-separated, headers and totals) and Copy data as JSON
73
+ (pivotkit-core's `toJson`: header texts, labels and raw values; not the view, which Views, Copy view
74
+ as JSON copies); a page that does not allow copying gets a note. `onExport` gets every copy too:
75
+ kinds `copy-table`, `copy-json`, `drill-copy`, `drill-json`, `drill-csv`, `drill-xlsx`, with `text`
76
+ for a copy and `rows: { shown, count }` for a drill-down export; returning false keeps it from the
77
+ clipboard or the download. The Export menu and its texts load with the menus; the export module
78
+ starts loading when the Export menu or the drill-down opens, so a copy happens in the click.
79
+ - The filter and the chip menus (a scrolling middle, a foot that stays in view) may cover their anchor
80
+ when they fit neither below nor above it: placed against the window's edge, as tall as the window
81
+ allows (`fill` of the popover); every other popover stays next to its anchor and scrolls. The
82
+ filter is a column with a scrolling middle (values and condition, the list of values giving way
83
+ first), its head and Apply and Cancel always in view.
84
+ - Enlarge of the result and of the drill-down: the name says what a click does (Enlarge, Reduce), so
85
+ the button is no toggle (no `aria-pressed`); the highlight shows the state.
86
+ - Sort by value and Top N by any value that gives numbers: the sort section lists "Largest … first"
87
+ and "Smallest … first" for each such value, Top N has a "by" select; the first value is the
88
+ default. A value condition on a row or column field ("Value filter…" in the Filters section of its
89
+ menu: a value, an operator of `CATALOG.valueOps` and a number, two for between), pivotkit-core's
90
+ `value` filter, shown on the chip and in the menu as "Sum of Revenue > 1,000"; Clear removes it,
91
+ Remove filter too; editing changes only the condition (or top N) being edited, and a measure no
92
+ longer among the values stays a choice. Numbers in the menus (value condition, Top N, number
93
+ ranges) are text fields read in the report's locale ("1.000,5" in German, a plain "1000.5"
94
+ everywhere), with a note under a field that holds no number. Labels `numberInvalid`,
95
+ `countInvalid`, `sizeInvalid`, `topBy`, `valueFilter`, `valueFilterBy`, `valueFilterOp`,
96
+ `valueFilterNumber`, `valueFilterTo`, `valueOps` and `valueConditions`.
97
+ - Chart display settings in the chart type menu ("Display"): value labels, legend, title, smooth
98
+ lines, axis labels (all straight when they fit, slanted, else every n-th with a note; long names cut
99
+ with "…", whole in the tooltip), long titles cut with "…", and group labels under the axis for two
100
+ or more row fields (automatic: only where the chart has room; on, off); kept in
101
+ the view, so saved views, links and the PNG export show them. A tip suggests bars for lines over
102
+ categories without an order (`chartTrend`, "Switch to Bars").
103
+ - Chart type Donut (a ring; the pie is a whole circle), and "Labels: Outside / Inside" for a pie or a
104
+ donut (`chart.labelPosition`): inside writes only the number on the slice (the share when
105
+ Automatic) in a colour that reads on it, the legend names the slices. Labels `chartTypes.donut`,
106
+ `labelPosition`, `labelPositionNames`.
107
+ - `chartOptions`: plain JSON merged over the ECharts option (lists entry by entry, an object into
108
+ every entry of a list); it wins over the view's settings; functions, values that are not JSON and
109
+ the ECharts options that are markup or addresses (a string `formatter` at any depth, `rich`, `link`,
110
+ `sublink`, `image`, the tooltip's element) are left out with a warning.
111
+ - The Views menu (labels `views`, `share`; "Ansichten" in German) with the templates and Share: Copy link (with `shareLink`:
112
+ `true` or a base URL; the view in the fragment, `#pivot=` or `#pivot-<storageKey>=`, only that
113
+ entry changed so a hash route stays; `true` links to the page without its query; read after the
114
+ first render as the start, and on a fragment change as one undoable step), Copy view as JSON,
115
+ Download view (.pivotkit.json) (`onExport` kind `"json"`), Load view… from a pasted view file, JSON,
116
+ a link or a file, and a line on what a shared view gives away (`sharePrivacy`).
117
+ - The prop `schemaUrl`: the `$schema` of the view files the report writes (a self-hosted copy of the
118
+ schema, or `null` / `""` for none); loading never depends on it.
119
+ - Views are shared as pivotkit-core's view file: the envelope with the view's name, its source and
120
+ the fields it uses, `generator` with this package's version from its `package.json`; a link carries
121
+ its link profile. A bare view and a link with one still load; a newer format or view version is
122
+ refused with "Update pivotkit to open it."
123
+ - Props `source` (`{ id, name }`), `sources` and `onSourceSwitch`: a view made for another source, or
124
+ with fields this data lacks or has with another type, asks before it is loaded (Load anyway,
125
+ Cancel, "Switch to “…” and load"); labels `loadCheckTitle`, `loadCheckSource`,
126
+ `loadCheckOtherSource`, `loadCheckMissing`, `loadCheckChanged`, `loadAnyway`, `switchAndLoad`.
127
+ - A loaded view is one undoable step with a note that has Undo and goes by itself ("View loaded",
128
+ `toastViewLoadedPartly` when parts were left out: a warning, not an error); what was left out stays
129
+ in the collapsible "Some parts of the view were not used" area above the result until it is
130
+ dismissed (`dismissIssues`) or another view is loaded; so does a saved view trimmed to the limits
131
+ (`viewTrimmed`).
132
+ - `persistView="session"`: the view kept per tab in `sessionStorage`; Reset stores the start view.
133
+ - `loading` and a skeleton (toolbar, zones, table rows, `role="status"` announced once, reduced motion
134
+ respected) while the host loads data, while more than 10,000 rows are encoded the first time and
135
+ while a link is read.
136
+ - Filters say what they keep: "Filter: 15 of 45" or the condition in the chip menu, in the accent
137
+ colour, with "Remove filter" right below; "Remove filter" at the top of the filter popover; the ×
138
+ of the text condition removes it at once.
139
+ - One clear "×" for every text field in a menu (field search, value name, "Starting at", saved
140
+ view's name, filter search and condition, Load view): it empties the field and keeps the focus there,
141
+ Escape does the same first; a value's name goes back to its default at once, as one undo step.
142
+ - "Filter…" in the field list for a field not placed: its filter opens at once, Apply puts it into
143
+ Filters with the selection.
144
+ - The Values menu says where filtering happens; an "i" next to each zone's title explains it with an
145
+ example; the field list's grip says "Drag into a zone" and opens the field's menu on a click.
146
+ - Options, Help: two switches, "Show tips" and "Show explanations" (every "i": of the settings, the
147
+ zones and the field descriptions), remembered with the tips (`"-explanations"` in
148
+ `dismissedTips`); `fieldInfo`, `zoneInfo` and `settingInfo` ("on", "off") decide one kind each for
149
+ the host, whatever the switch says.
150
+ - One way to explain a setting: the "i" (hover, focus, tap) next to the totals, Show as, Along, the
151
+ export formats (the export menu is a dialog), and a pie's Labels and the Group labels; menu rows stay
152
+ one line (`aboutSetting`, `settingInfo`).
153
+ - An entry that would change nothing is disabled and says why, only while disabled: the grand total
154
+ row needs a field in Rows, the grand total column one in Columns, subtotals two or more fields on
155
+ their axis (`needsRowField`, `needsColField`, `needsRowFields`, `needsColFields`), the chart image
156
+ "Switch to Chart first." (`exportPngNeedsChart`).
157
+ - Long menus: the wheel and the swipe stay in the menu (the table and the page behind never scroll),
158
+ a menu is never higher than the window; sections fold with their title, the frequent ones open, the
159
+ user's choice kept with the tips (`"open:<id>"`, `"closed:<id>"` in `dismissedTips`); "More
160
+ formats" for the rarer number formats.
161
+ - Enlarge and Full screen at the top right of the result: Enlarge lets the result fill the report
162
+ (Escape or the button, which then reads "Reduce", restores; label `reduce`), Full screen uses the Fullscreen API on the report's root (also in a
163
+ shadow root) and is offered only where the browser has it; neither is part of the view.
164
+ - Expand all and Collapse all are offered only when they change something, say why not, and report
165
+ what they did ("5 groups collapsed").
166
+ - Notices and tips above the result, from one table (`tips.js`). Notices, always shown and not
167
+ dismissible: a filter that leaves nothing (with "Remove filter"), top N, the chart's category cap.
168
+ Tips: what 100 % is for a percentage, dates on Columns and many
169
+ series in a chart (with "Swap rows and columns"), a text field in Values, an ungrouped date with
170
+ many columns (with "Group by"), many columns (swap), Rows without Values, Undo after the first drag,
171
+ saving after five changes (opens Views; after a save it waits for five more), the empty report and
172
+ how to open a value; a chosen chart type over dates ("Show as lines over time", `chartOverTime`),
173
+ a pie or donut of more than 7 slices ("Switch to Bars", `pieSlices`) and one whose columns it adds
174
+ up (`pieColumns`). One tip at a time, the most important first, the next one waiting until it is
175
+ followed or dismissed; in the flow above the result, each with an x; Options has
176
+ "Show tips", "Show dismissed tips again" and the keyboard shortcuts. Props `tips` ("on", "off" or ids),
177
+ `storageKey` (localStorage per report, read after the first render so server rendering and
178
+ hydration match), `dismissedTips` and `onTipDismiss`. The texts are `labels.tips`; the earlier keys
179
+ `topNote`, `bottomNote`, `noValuesHint`, `cellHint`, `emptyHint`, `chartManySeries`,
180
+ `chartDatesOnColumns` and `chartCapped` still apply as aliases of their tip.
181
+ - `fieldDefaults[field].label`, `.description`, `.href` and `.type`: a display name everywhere a field
182
+ name shows (chips, headers, value names, drill-down, chart, CSV and XLSX; views keep the names), an
183
+ "i" with the description on hover, focus and tap ("Learn more" for an https link), the description
184
+ at the top of the chip menu and on table and drill-down headers, field search by label and
185
+ description, and the column type for encode. A label two fields share, or another field's name,
186
+ gets the field's name in parentheses. A field without them looks as before.
187
+
188
+ - `<PivotReport>`: field list with search, type icons, quick add and a menu per field; Rows, Columns,
189
+ Values and Filters zones with chips that are dragged, reordered and removed and say what is set on
190
+ them ("3 of 4", "Top 5", the sort); chip menus for sort, date grouping, number ranges, top N,
191
+ filter, aggregator (common ones first), "show as", number format, highlighting, name and move.
192
+ - Controlled (`view` + `onViewChange`) and uncontrolled (`defaultView`) use; the undo history stays in
193
+ the report however often the host renders, new data with the same columns keeps it; `dataKey`
194
+ encodes a new array only when its key changes. Undo notes say what was undone.
195
+ - A date is grouped by the span of its values when it is placed (day, month, quarter or year);
196
+ `fieldDefaults` gives a field's aggregator and format in Values.
197
+ - Drag and drop with @dnd-kit (mouse, touch and keyboard with positions announced), a drag preview
198
+ above everything, auto-scroll, drop on the field list to remove, header cells dragged into a zone.
199
+ - Table with sticky header and row labels (their offsets follow the report's width and fractional row
200
+ heights), expand and collapse, totals on and off, colour scales and
201
+ data bars, keyboard navigation, drill-down panel and `onCellClick`; virtual scrolling from 300 rows.
202
+ - The chart type "Automatic" (the default, `chart.type: "auto"`): lines when a date or a grouping of
203
+ one along the time line is on Rows (a weekday or hour of day is bars); with dates on Columns only, lines too, with rows and columns swapped for the chart
204
+ alone (the table keeps its layout); bars otherwise. The toolbar's button shows the type ("Automatic",
205
+ "Bars"; its name "Chart type: …"), the menu's "Automatic" what it draws now (`chartAutoNow`). A
206
+ type the user picks stays.
207
+ - Chart with Apache ECharts (a peer dependency, loaded on first use): bars, stacked and horizontal
208
+ bars, lines, area, pie, donut, heatmap (its colour scale in the value's number format), themed from the `--pk-*` tokens, with a text alternative, at most 50
209
+ categories, tips for many series and dates on Columns, and "Swap rows and columns"; a stacked area
210
+ or line chart is named "Area" or "Lines" in the toolbar and the picker.
211
+ - Filter popover with values and row counts, search, select all or none and a condition on the labels
212
+ by the field's type: "Text condition" for text, "Condition on the label" for a number (label
213
+ `conditionNumber`), none for a date or a grouping of one and a yes/no field.
214
+ - Undo, redo and reset; saved views (the `templates` prop: load, save, delete of entries marked
215
+ `deletable` after an in-page confirmation; the host's callbacks may return a promise); export to XLSX, CSV and PNG, with
216
+ `onExport` seeing every file before its download and able to skip it (then without the "Exported"
217
+ note).
218
+ - Popovers and menus open at their button also inside an ancestor with a transform, a filter or
219
+ `contain`, which becomes the containing block of fixed elements.
220
+ - The toolbar moves buttons into "More" by a fixed priority (Reset, Layout, Views, Options, chart
221
+ type) and the report's width, not by the length of its texts: the same buttons show at the same
222
+ width in English and German; Redo stays next to Undo. On a narrow report More and every other menu
223
+ are a sheet at the bottom of the window, as high as 82 % of it, scrolling inside.
224
+ - The field list is one stop of the Tab order: arrow keys move between the fields (up, down, Home,
225
+ End) and a field's grip, name, "i" and menu (left, right), Shift+F10 or the context menu key opens
226
+ its menu, Enter on a name adds it; a "Skip to the toolbar" link before it (label `skipToToolbar`);
227
+ both in Options → Help → Keyboard shortcuts. A long field name takes two lines, with the whole name
228
+ as its title.
229
+ - A date grouping is named in words: "Created by month", "Erstellt nach Monat" (labels
230
+ `derivedName`, `unitInName`).
231
+ - Status notes sit at the bottom edge of the report's part on screen, also when the report reaches
232
+ past the window. The Views menu stays open after "Save", with the new entry and Copy link in it.
233
+ - Row labels on a narrow report wrap between words and keep at least 5.5em, so a common word is not
234
+ cut in two; a longer one breaks at a hyphen of its own (labels are data, not the UI's
235
+ language), a word longer than the column only as a last resort.
236
+ - On a touch screen (a coarse pointer) the ×, the "i", a field's menu and grip and a tip's x are at
237
+ least 44 px (token `--pk-target-touch`).
238
+ - The texts only the menus show load with them (`menu-labels.js`); a host's `labels` for them still
239
+ apply. `LABELS` (every text, English and German) is the subpath export `pivotkit-react/labels`.
240
+ - The medium layout narrows the field list without setting `--pk-panel-w` on the root, so a host's
241
+ value of the token stays in force.
242
+ - Notes in the status line under the table (none for adding a field), kept while hovered or focused.
243
+ - Themes light and dark (`theme="auto"` follows the nearest `data-theme`, also across a shadow root,
244
+ and `prefers-color-scheme`), CSS custom properties `--pk-*` with zero-specificity defaults,
245
+ `prefers-reduced-motion`. Works inside a shadow root with the stylesheet linked there.
246
+ - Layouts for wide, medium and narrow reports; toolbar buttons keep their text and move into "More"
247
+ when there is no room; field list as a modal drawer below 640 px.
248
+ - Labels in English and German with plain words; `labels` overrides single texts and ignores entries
249
+ of the wrong type; the report's `lang` follows the labels.
250
+ - Labels `toastSaveRejected` and `toastDeleteRejected` ("The server could not save the view."),
251
+ shown when the host's save or delete callback throws or rejects without a message; a message the host
252
+ gives (an `Error`, a text) is shown instead.
253
+ - Compact layout: below 600 px of height, 820 px in the narrow layout (border box, measured before
254
+ the first paint), the zones start folded into one line that says what is in them, and at most one
255
+ tip shows; the line and the Layout toggle of the toolbar (a stable text with `aria-pressed`; its
256
+ place in the toolbar or in "More" depends on the width only) open and fold them, and a drag opens
257
+ them while it lasts. A fold waits while a menu or popover is open, and a focus in the zones moves to
258
+ the folded line. Labels `layout`, `showLayout` and `layoutEmpty`.
259
+ - The result keeps a least height (240 px, 280 px narrow): a report without `height` that needs more
260
+ grows past its 640 px (an inline `min-height`), so the page scrolls; with a `height` it stays inside
261
+ and its table scrolls. The prop `grow` ("on", "off") decides it either way.
262
+ - The menus' panels load on demand (`dist/menus.js`, `dist/chunks/`); a failed load says so in the
263
+ menu with Try again, and the next try imports again.
264
+ - A link in the page's address made for other data asks before it opens (Load anyway, Cancel, Switch),
265
+ as a pasted view file does; the load check takes the focus when it appears.
266
+ - The `label` prop names the report's region landmark (default `labels.report`); several reports on
267
+ one page need one name each.
268
+ - A limit of pivotkit-core in place of the result says which one and what to change: too many
269
+ rows in the data (`tooManyRows`), too many cell updates (`tooMuchWork`), groups (`tooManyGroups`) or
270
+ cells with subtotals (`tooManyCells`) in the layout, besides the dense grid's `tooLarge`.
271
+ - A field beyond pivotkit-core's limit of its zone (8 per axis, 16 values) is refused with a note
272
+ (`zoneFull`); a saved view with more loads the fields that fit and says so above the result
273
+ (`viewTrimmed`).
274
+ - Number ranges: size and "Starting at" (Excel's origin; empty is 0); a new size keeps the start, and
275
+ a start so far from the field's numbers that every row would be blank is refused with a note.
276
+ - `fieldDefaults[field].order`: the field's custom order of items. A field placed on Rows or Columns
277
+ is sorted in it, and so is one in a view or template without a sort entry for it; its menu offers
278
+ "Custom order" and "Custom order, reversed" (also for a view's own custom sort).
279
+ - Another aggregator in a value's menu keeps the field's format (`fieldDefaults` or the user's own)
280
+ while the result is in the field's unit, not for a count; "show values as" starts again.
281
+ - Long row labels wrap: the label columns share at most 40 % of the report's main area and a value's
282
+ name wraps beyond 30 %, so a phone shows values next to nested row labels. From 300 rows on, where
283
+ rows have one height, a label is cut with an ellipsis; the status line shows the whole label of a
284
+ tapped label or of the focused value until the focus leaves the table or the table is scrolled.
285
+ - A blank value cell with no rows behind it is not clickable and Enter does nothing; `onCellClick` is
286
+ not called for it. Every empty cell stays an arrow-key stop and a screen reader hears "No rows" or
287
+ "No value" (`labels.emptyCell`, `labels.emptyValue`); a copied selection keeps the cell empty.
288
+ - A narrow chip shortens the field's name with an ellipsis and keeps a few characters of it, never a
289
+ badge ("Top 10", "15 of 45"); on a phone a zone's name stands above its chips.
290
+ - Heatmaps slant their column names where they would overlap, write every row name where a line
291
+ fits each row (else every n-th), and show the numbers only where the formatted numbers fit the
292
+ cells.
293
+ - The export menu says what each file keeps: the XLSX every decimal, the CSV percentages and
294
+ calculations as the table shows them.
295
+ - Tested against the five real public data sets of the playground and the documentation site:
296
+ weather (Open-Meteo), countries (World Bank), earthquakes (USGS), Nobel laureates and the release
297
+ cycles of software products (endoflife.date).
298
+
299
+ [Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.1.0...HEAD
300
+ [0.1.0]: https://github.com/eizedev/pivotkit/releases/tag/pivotkit-react@0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 eizedev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.