pivotkit-react 0.3.0 → 0.5.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/CHANGELOG.md +339 -1
- package/README.md +2 -2
- package/dist/chunks/{chunk-IOPAM4JD.js → chunk-2AT72SLA.js} +635 -980
- package/dist/chunks/chunk-3E4NB5RZ.js +215 -0
- package/dist/chunks/{chunk-32Z33U6S.js → chunk-3WUGQPWV.js} +106 -9
- package/dist/chunks/{chunk-7CC4JHDY.js → chunk-4RS72AAA.js} +27 -8
- package/dist/chunks/{chunk-EM23V5GH.js → chunk-E6M57YLL.js} +19 -8
- package/dist/chunks/{chunk-RWYHJRQO.js → chunk-JMRTIOX4.js} +17 -7
- package/dist/chunks/chunk-RIOSIYGC.js +665 -0
- package/dist/chunks/{chunk-APB4NW4O.js → chunk-U5Q5I2D5.js} +36 -10
- package/dist/chunks/report-run-BZBFOMPF.js +12 -0
- package/dist/chunks/{unused-texts-K3VFH65P.js → unused-texts-Y4R67XSN.js} +1 -1
- package/dist/chunks/{unused-texts-de-OW4TGIVX.js → unused-texts-de-6YVPTNVS.js} +1 -1
- package/dist/echarts.js +38 -156
- package/dist/import-ui.js +765 -0
- package/dist/import-worker.js +20 -0
- package/dist/index.js +683 -244
- package/dist/labels.js +14 -10
- package/dist/menu-texts-de.js +1 -1
- package/dist/menus.js +768 -299
- package/dist/styles.css +322 -100
- package/package.json +9 -4
- package/types/chart-decorate.d.ts +28 -4
- package/types/chart-types.d.ts +2 -4
- package/types/data-history.d.ts +85 -0
- package/types/data-keep.d.ts +51 -0
- package/types/data-menu.d.ts +11 -0
- package/types/dom.d.ts +40 -7
- package/types/echarts.d.ts +1 -1
- package/types/export-run.d.ts +37 -3
- package/types/field-info.d.ts +32 -0
- package/types/filter.d.ts +1 -1
- package/types/icons.d.ts +1 -0
- package/types/import-host.d.ts +53 -0
- package/types/import-labels.d.ts +401 -0
- package/types/import-limits.d.ts +6 -0
- package/types/import-module.d.ts +2 -0
- package/types/import-run.d.ts +73 -0
- package/types/import-source.d.ts +32 -0
- package/types/import-steps.d.ts +121 -0
- package/types/import-ui.d.ts +108 -0
- package/types/import-worker.d.ts +1 -0
- package/types/index.d.ts +81 -11
- package/types/labels.d.ts +224 -4
- package/types/lazy-import.d.ts +4 -0
- package/types/lazy-menus.d.ts +2 -2
- package/types/levels.d.ts +3 -2
- package/types/light-tokens.d.ts +16 -0
- package/types/menu-labels.d.ts +37 -17
- package/types/menu-ops.d.ts +161 -40
- package/types/menu-topics.d.ts +9 -8
- package/types/menus.d.ts +1 -0
- package/types/names.d.ts +47 -19
- package/types/overflow.d.ts +29 -17
- package/types/place.d.ts +24 -0
- package/types/popover.d.ts +47 -5
- package/types/print-frame.d.ts +24 -0
- package/types/report-run.d.ts +14 -0
- package/types/section.d.ts +2 -2
- package/types/share-actions.d.ts +3 -3
- package/types/share.d.ts +13 -17
- package/types/theme.d.ts +2 -16
- package/types/tips.d.ts +5 -0
- package/types/toasts.d.ts +1 -1
- package/types/toolbar-panels.d.ts +11 -9
- package/types/unused-keep.d.ts +20 -0
- package/types/unused-texts.d.ts +13 -3
- package/types/unused.d.ts +1 -0
- package/types/use-export.d.ts +2 -2
- package/types/use-view-history.d.ts +12 -4
- package/types/view-ops.d.ts +65 -6
- package/types/virtual.d.ts +15 -0
- package/types/chart-layout.d.ts +0 -111
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,342 @@ All notable changes to `pivotkit-react` are documented in this file. The format
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.5.0] - 2026-11-13
|
|
10
|
+
|
|
11
|
+
### Upgrading from 0.4
|
|
12
|
+
|
|
13
|
+
What a host checks; the [upgrade page](https://pivotkit.eize.dev/getting-started/upgrading/) has the details.
|
|
14
|
+
|
|
15
|
+
- **Breaking:** views, view files and links are written in format version 2; pivotkit 0.4 refuses
|
|
16
|
+
them as newer. Version 1 loads with the same result.
|
|
17
|
+
- **Breaking:** dark colours of a host go on `.pk-root[data-pk-theme="dark"]`, not on an attribute of
|
|
18
|
+
the page (`html[data-theme="dark"] .pk-root`): the Excel export and the HTML report read the light
|
|
19
|
+
theme by showing it on the report for a moment, and a rule on the page's attribute would put the
|
|
20
|
+
dark colours into the file.
|
|
21
|
+
- **Breaking:** a page with an import map maps `pivotkit-report` and `pivotkit-core/chart`.
|
|
22
|
+
- The colour scale's default is blue; red, yellow, green come back with `--pk-scale-low: #f8696b`,
|
|
23
|
+
`--pk-scale-mid: #ffeb84`, `--pk-scale-high: #63be7b` (dark: `#c2413f`, `#b39a2e`, `#3f9a5c`).
|
|
24
|
+
`--pk-scale-mid` is no longer set.
|
|
25
|
+
- The label key `filter` is removed (a host's text for it is ignored).
|
|
26
|
+
- The font weights 550 and 650 are 600 (`--pk-weight-strong`).
|
|
27
|
+
- The chart's text is 14 px, not 12 px.
|
|
28
|
+
- Column subtotals are off by default: a start view or template without `totals.colSubtotals` adds
|
|
29
|
+
`totals: { colSubtotals: true }` to keep them.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Depends on `pivotkit-core` `^0.5.0` (was `^0.4.0`): a host updates both together, or it gets
|
|
34
|
+
two copies of pivotkit-core.
|
|
35
|
+
- The chart's axes, legend and labels are 14 px or more (`--pk-chart-text-size`, by default
|
|
36
|
+
`var(--pk-small)`), not ECharts' 12 px; the labels are laid out for that size ([#221](https://github.com/eizedev/pivotkit/issues/221)).
|
|
37
|
+
- Export → HTML report takes the report's font size (`--pk-font-size` and `--pk-small` in px, so a
|
|
38
|
+
report on a 16 px page writes a 16 px file) and a host's `--pk-report-title-size`,
|
|
39
|
+
`--pk-print-size` and `--pk-print-small` ([#220](https://github.com/eizedev/pivotkit/issues/220)).
|
|
40
|
+
- A colour scale in the theme's colours runs from light to strong blue (`--pk-scale-low` and
|
|
41
|
+
`--pk-scale-high` are `var(--pk-heat-low)` and `var(--pk-heat-high)`, the heatmap's colours), not
|
|
42
|
+
from red over yellow to green: it says "more", not "good" or "bad". `--pk-scale-mid` is no longer
|
|
43
|
+
set; a host that sets it gets a three-colour scale ([#212](https://github.com/eizedev/pivotkit/issues/212)).
|
|
44
|
+
- The chart's plan, its colours from the tokens and its marks are pivotkit-core's (`chartPlan`,
|
|
45
|
+
`chartThemeFrom`, `pivotkit-core/chart`), so an SVG and a printed report of pivotkit-report draw
|
|
46
|
+
the same chart; the report looks the same. A host page with an import map adds
|
|
47
|
+
`pivotkit-core/chart` next to `pivotkit-core/export`, and `pivotkit-report` (a dependency, loaded on
|
|
48
|
+
the first HTML report, SVG or print of the Export menu) ([#165](https://github.com/eizedev/pivotkit/issues/165)).
|
|
49
|
+
- The table follows pivotkit-core's totals ([#155](https://github.com/eizedev/pivotkit/issues/155), [#156](https://github.com/eizedev/pivotkit/issues/156)): column subtotals off in a new report,
|
|
50
|
+
no empty column and no total rows for fields in Rows without a value, no subtotal for a group of
|
|
51
|
+
one item (its arrow stays). Labels without a value column next to them take up to 85 % of the
|
|
52
|
+
report's width instead of 40 %, so a name on a phone is not broken inside a word.
|
|
53
|
+
- A subtotal column is set apart from its group: a line before it (`--pk-border-strong`) and a
|
|
54
|
+
slightly darker `--pk-total` (light `#eef1f5`, dark `#21252d`; text on it 14.9:1 and 12.8:1, the
|
|
55
|
+
muted header text 5.4:1 and 6.6:1), and its header's tooltip says what it adds up ([#156](https://github.com/eizedev/pivotkit/issues/156)).
|
|
56
|
+
- Options: a total switch that changes nothing is disabled without a tick; every total also needs a
|
|
57
|
+
field in Values ("Needs a field in Values.", `needsValue`). The explanations of the subtotals say
|
|
58
|
+
"subtotal", name a subtotal's label ("North Total") and say that a group of one item has none ([#156](https://github.com/eizedev/pivotkit/issues/156)).
|
|
59
|
+
- The npm description names views as JSON files, as the README and the docs do, instead of templates
|
|
60
|
+
([#191](https://github.com/eizedev/pivotkit/issues/191)).
|
|
61
|
+
- npm keywords `pivot-grid`, `pivottable` and `excel-export`, the terms people search for ([#172](https://github.com/eizedev/pivotkit/issues/172)).
|
|
62
|
+
- The report reads and writes pivotkit-core's view version 2 ([#165](https://github.com/eizedev/pivotkit/issues/165)):
|
|
63
|
+
the picks of a field are an `in` filter with `not: true` and `blanks`, a rule on the names a `text`
|
|
64
|
+
filter (case and runs of whitespace ignored, `on: "label"` for a field that is not text), "is not",
|
|
65
|
+
"does not contain" and "is not between" the positive operator with `not: true`. Views of version 1
|
|
66
|
+
(stored, shared, the host's) load with the same result. A rule the menus have no word for (a
|
|
67
|
+
loaded view's "is not greater than") is said as "not (…)".
|
|
68
|
+
- A relative range the quick choices do not write (a loaded view's hours, or a second range of a
|
|
69
|
+
field) says what it keeps in words, in English and German, and stays as it is: its row in the
|
|
70
|
+
Filter level can only be removed.
|
|
71
|
+
- A comparison of dates by another precision (a loaded view's) says its unit ("Feb 2026", "from Q2
|
|
72
|
+
2026") and stays as it is.
|
|
73
|
+
- The view files and links the report writes are of format version 2, with the `$schema`
|
|
74
|
+
`https://pivotkit.eize.dev/schema/view-file-2.json` by default; files and links of version 1 load as
|
|
75
|
+
before. The link's place in the fragment is pivotkit-core's (`linkFragment`, `withLinkFragment`).
|
|
76
|
+
- A view read from a link, a file, pasted JSON or the tab's storage keeps at most 50 filters and is
|
|
77
|
+
at most 1,000,000 characters long (pivotkit-core's `outsideLimits`), or the host's lower limits.
|
|
78
|
+
- The field list's menu has one entry for filtering, **Add to Filters**, instead of two that did almost
|
|
79
|
+
the same ([#157](https://github.com/eizedev/pivotkit/issues/157)): it opens the field's filter at
|
|
80
|
+
once, **Apply** puts the field into Filters with the choice, **Cancel** places nothing. A field on
|
|
81
|
+
Rows or Columns moves to Filters on Apply; a field in Filters opens its filter. "Filter…" is gone,
|
|
82
|
+
and with it the label `filter` (a host's text for it is ignored).
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- The token `--pk-chart-text-size`: the chart's text but the title, resolved to px like
|
|
87
|
+
`--pk-chart-title-size`; it reaches the PNG, the SVG and the HTML report too ([#221](https://github.com/eizedev/pivotkit/issues/221)).
|
|
88
|
+
- Corners, the code font, the focus ring and the chart's title and marks as tokens ([#216](https://github.com/eizedev/pivotkit/issues/216)):
|
|
89
|
+
`--pk-radius-xs`, `--pk-radius-mark` and `--pk-radius-icon` (4, 5 and 6 px, four, five and six
|
|
90
|
+
sevenths of `--pk-radius-sm`, so a host that sets `--pk-radius-sm` changes them too),
|
|
91
|
+
`--pk-radius-card` (8 px, the chart's tooltip), `--pk-radius-chart` (the chart's bars and slices,
|
|
92
|
+
`var(--pk-radius-xs)`), `--pk-font-mono` (the JSON text field), `--pk-chart-title-size`
|
|
93
|
+
(`max(16px, var(--pk-font-size))`: 16 px as before up to a 16 px font, as large as the report's text
|
|
94
|
+
above it), `--pk-focus-width` and `--pk-focus-offset` (2 px), `--pk-glow-width` (3 px, the soft ring
|
|
95
|
+
of a focused text field and of a zone a field is dragged over) and `--pk-ring-width` (2 px, the
|
|
96
|
+
inset rings). The report looks the same with the defaults. The chart resolves its title size and
|
|
97
|
+
corners to px, so a host may write them in `em` or `calc()`. A test fails on a corner radius, a
|
|
98
|
+
font family or a ring width written outside the token blocks, and on a radius or a title size set
|
|
99
|
+
from code.
|
|
100
|
+
- Font weights as tokens ([#201](https://github.com/eizedev/pivotkit/issues/201)):
|
|
101
|
+
`--pk-weight-normal` (400), `--pk-weight-medium` (500), `--pk-weight-strong` (600) and
|
|
102
|
+
`--pk-weight-bold` (700), documented in Theming. Every rule uses them, the chart's tooltip, title
|
|
103
|
+
and group labels too, so a host whose font looks too heavy or too light sets four tokens instead of
|
|
104
|
+
overriding selectors. The weights 550 (field chips, the drill-down's path) and 650 (titles, table
|
|
105
|
+
headers) are now 600, to keep the scale at four steps; a font without those faces drew them as 600
|
|
106
|
+
or 700 anyway. The HTML report and print take the report's weights along, in the dark theme too
|
|
107
|
+
(its colours only in the light theme, as before). A test fails on a colour or font weight written
|
|
108
|
+
outside the token blocks.
|
|
109
|
+
- Export → "HTML report (.html)", "Chart image (.svg)" and a group "Print" with "Print or save as
|
|
110
|
+
PDF…": the table as it is shown (and the chart when it is shown) as a page that opens anywhere and
|
|
111
|
+
prints well, the chart as SVG, and the same report in the browser's print dialog, from a sandboxed
|
|
112
|
+
frame a strict Content-Security-Policy allows. `onExport` gets the kinds `html`, `svg` and `print`
|
|
113
|
+
(with the report's HTML; `false` prints nothing). pivotkit-report is a new dependency, loaded on the
|
|
114
|
+
first of these exports ([#165](https://github.com/eizedev/pivotkit/issues/165)).
|
|
115
|
+
- The tip `colSubtotals`: while a Total column shows (column subtotals on, two or more fields in
|
|
116
|
+
Columns, a value, an open column group of two or more items), it says that a Total column adds up the group before it, with the button **Hide column subtotals** ([#156](https://github.com/eizedev/pivotkit/issues/156)).
|
|
117
|
+
- The prop `importLimits` ([#169](https://github.com/eizedev/pivotkit/issues/169)): the limits a file
|
|
118
|
+
loaded with `allowImport` is read and shown with, merged key by key over `limits`. The host's data
|
|
119
|
+
keeps `limits`, so a host can keep uploads small (`importLimits={{ rows: 1000 }}`) without capping
|
|
120
|
+
its own data. Without it a file has `limits`, as before. A key of `importLimits` is not capped by
|
|
121
|
+
`limits`, so a file may also get more. Compared by value, as `limits`.
|
|
122
|
+
- The Filter level edits what view version 2 can say:
|
|
123
|
+
- A rule on the name offers "does not begin with" and "does not end with".
|
|
124
|
+
- **Also keep items without a value (N rows)** under the rules, for a field with blank items and a
|
|
125
|
+
rule on its items or a quick choice: every such rule keeps the blank items (`blanks: "include"`),
|
|
126
|
+
a new rule too; off, none does. Only the blanks stay a pick: Select none, then "(blank)".
|
|
127
|
+
- A date's quick choices count in a unit: **This [unit]** (the units whose current period has
|
|
128
|
+
data) and **Last [N] [unit]**, with **Include the current <unit>** under it while it is set;
|
|
129
|
+
**More choices**, folded: **Next [N] [unit]**, **Before the last [N] [unit]** and **Rolling
|
|
130
|
+
instead of whole calendar periods**. No unit is finer than the grouping (by month: months,
|
|
131
|
+
quarters, years; a date or by day: days and weeks too). Last keeps its count when the unit
|
|
132
|
+
changes while it reaches the data. **Counted back from** offers the first record and a date of
|
|
133
|
+
your own as well; it stands under the choices when the data end before the current period or it
|
|
134
|
+
is not today, else among More choices. A date being typed keeps the last whole date for the
|
|
135
|
+
ranges and says so; left incomplete, the field shows that date again. When Last's current period
|
|
136
|
+
has no data, **Count back from the latest record (date) instead** under it does that in one
|
|
137
|
+
click. A loaded view's next, this, before, rolling, quarter or week range is its quick choice,
|
|
138
|
+
editable there.
|
|
139
|
+
- **Top items**: **Also show items with the same value as the last one** while a top is set
|
|
140
|
+
(`ties: "all"`); another count or measure keeps it. Under it the level says how many items
|
|
141
|
+
show ("7 items shown"), or, for a field below another on its axis, that a group can show more.
|
|
142
|
+
- The menu's search finds the rule on the name by its operators ("does not begin with").
|
|
143
|
+
Texts in English and German. The chip says a range of quarters, weeks or this period by its
|
|
144
|
+
periods ("this quarter (Q4 2026)", "last 3 months, current period excluded (Aug–Oct 2026)"); a
|
|
145
|
+
rolling range counted from a date says its days, not midnight as a time. The unit selects of the
|
|
146
|
+
quick choices are named after their choice ("Unit of “Last …”") and as high as the count beside
|
|
147
|
+
them. In German, a range counted from the latest or first record says "Datensatz", as the menu
|
|
148
|
+
does.
|
|
149
|
+
- The warning about a view's unused parts says when a filter's item is in the data in another case
|
|
150
|
+
(“north”, but “North”), and names a key inside a part of the view by itself. It says when an item
|
|
151
|
+
is longer than 10,000 characters, and how many more problems it does not list.
|
|
152
|
+
|
|
153
|
+
### Fixed
|
|
154
|
+
|
|
155
|
+
- The warning about unused view parts keeps the view's or host's locale when the pivot fails
|
|
156
|
+
(including the work and group limits), and falls back to English for an invalid locale
|
|
157
|
+
([#162](https://github.com/eizedev/pivotkit/pull/162)).
|
|
158
|
+
- A workbook and an HTML report exported from the dark theme carry the host's light colours
|
|
159
|
+
(`--pk-scale-*`, `--pk-heat-*`, `--pk-chart-1` and the rest of the light theme): the report reads
|
|
160
|
+
its light theme for the export, without a transition or a frame in between, also inside
|
|
161
|
+
pivotkit-element. Before, they got pivotkit-core's and pivotkit-report's defaults. The HTML report
|
|
162
|
+
takes a host's `--pk-scale-mid` too ([#217](https://github.com/eizedev/pivotkit/issues/217)).
|
|
163
|
+
- A change made while a controlled host is still passing back an earlier view (a host whose view
|
|
164
|
+
goes through its server) builds on the report's own history, also when some of the earlier views
|
|
165
|
+
have come back in between: Undo takes back the user's steps one by one and records no "change
|
|
166
|
+
from outside" ([#141](https://github.com/eizedev/pivotkit/issues/141)).
|
|
167
|
+
- The Excel export writes a colour scale and data bars in the theme's colours the report resolves
|
|
168
|
+
from its tokens (`--pk-scale-low`, `--pk-scale-mid`, `--pk-scale-high`, `--pk-chart-1`), so a
|
|
169
|
+
theme of the host's carries over; a dark report writes the light theme's colours. Before, the
|
|
170
|
+
workbook always had Excel's red, yellow, green ([#212](https://github.com/eizedev/pivotkit/issues/212)).
|
|
171
|
+
- The explanation of an "i" inside a menu (Copy table in Export, a total in Options) is drawn above
|
|
172
|
+
the menu; at the window's right edge the menu in the browser's top layer covered it ([#213](https://github.com/eizedev/pivotkit/issues/213)).
|
|
173
|
+
- A description shown on hover of an "i" stays while the pointer is on its way from the "i" to it
|
|
174
|
+
(beside the "i" towards a description moved aside to stay in the window, or in the gap between
|
|
175
|
+
them) for up to one and a half seconds, so a slow move gets there; a pointer that took more than a
|
|
176
|
+
quarter of a second there closed it ([#213](https://github.com/eizedev/pivotkit/issues/213)).
|
|
177
|
+
- A choice clicked in a field's Top items level keeps the focus, also in Safari, where a click does
|
|
178
|
+
not focus a radio button ([#119](https://github.com/eizedev/pivotkit/issues/119)).
|
|
179
|
+
- The rule between a menu's groups had 1.3:1 contrast in the light theme and 1.2:1 in the dark one,
|
|
180
|
+
and in More, whose groups have no titles, it is the only thing that tells them apart. It is drawn
|
|
181
|
+
in the new token `--pk-rule`, 3:1 against the menu in both themes
|
|
182
|
+
([#128](https://github.com/eizedev/pivotkit/issues/128)).
|
|
183
|
+
- An open menu or popover follows its anchor when the anchor moves or changes size while it is open
|
|
184
|
+
(the zones' open animation, a transition of the host page)
|
|
185
|
+
([#120](https://github.com/eizedev/pivotkit/issues/120)).
|
|
186
|
+
- A delayed popover autofocus frame no longer steals focus from a control already in use
|
|
187
|
+
([#139](https://github.com/eizedev/pivotkit/issues/139)).
|
|
188
|
+
- Outside pie and donut labels appear on the first draw, including their chosen values
|
|
189
|
+
([#103](https://github.com/eizedev/pivotkit/issues/103)).
|
|
190
|
+
- The menus' text actions drew as plain text in the text colour, so they did not look clickable:
|
|
191
|
+
**Back**, **Reset filter**, **Clear**, **Remove**, **change it above**, **Select all**, **Select
|
|
192
|
+
none**, **Only** and **Swap rows and columns** are in the accent colour and semibold (Back at the
|
|
193
|
+
size of the text around it, the others at the small size); Reset filter, Clear, Remove and Swap
|
|
194
|
+
are greyed out while they would change nothing. A status note's **Undo** is semibold in a tint of
|
|
195
|
+
the accent that reads on the note. The reset that gives buttons and fields the report's font and
|
|
196
|
+
colour had outranked these styles; it no longer does, so the other controls look as designed too:
|
|
197
|
+
the icon buttons (×, "i", a field's menu, a tip's ×, a table row's expand arrow) and the folding
|
|
198
|
+
lines of the Filter level (More choices, the items left out by the rules) are muted until hovered,
|
|
199
|
+
a chip's name is semibold, the folded field list's **Fields** button is bold, the link **Skip to
|
|
200
|
+
the toolbar** (shown only while it has the keyboard focus) is in the accent colour and semibold,
|
|
201
|
+
and the folded layout line is at the small size. A field's menu button is
|
|
202
|
+
no longer faded on top of that, so it keeps 3:1. Text fields and selects keep the report's font
|
|
203
|
+
([#193](https://github.com/eizedev/pivotkit/issues/193)).
|
|
204
|
+
- The Filter level's **Count back from the latest record (…) instead** looked like a note, not like
|
|
205
|
+
something to click: it is a small button as the level's **Compare** buttons (a border, an icon
|
|
206
|
+
before its words, at least 24 px high, its text wrapping inside it at a narrow width)
|
|
207
|
+
([#179](https://github.com/eizedev/pivotkit/issues/179)).
|
|
208
|
+
- The note of a file over a limit named the file twice (`big.csv could not be loaded: "big.csv" has
|
|
209
|
+
more than …`) and only `limits.*` as what a host raises, although `importLimits` may set the limit.
|
|
210
|
+
It says the limit in the report's language (English, German), with its key in brackets, and that a
|
|
211
|
+
host can raise this limit: "big.csv could not be loaded: it has more than 1,000 rows (limits.rows):
|
|
212
|
+
load a smaller extract of it, or a host can raise this limit"; other errors of a reader lose the
|
|
213
|
+
file's name in front in both of its forms ([#185](https://github.com/eizedev/pivotkit/issues/185)).
|
|
214
|
+
- A workbook over pivotkit-xlsx's limits `archiveEntries` or `unpackedBytes` is said in the report's
|
|
215
|
+
language too ("book.xlsx could not be loaded: it has more than 524,288,000 bytes unpacked
|
|
216
|
+
(limits.unpackedBytes): …"), with the words in `labels.dataImport.limitWhat`; it showed
|
|
217
|
+
pivotkit-xlsx's English message ([#239](https://github.com/eizedev/pivotkit/issues/239)).
|
|
218
|
+
- A rule on the names ("begins with “ACTIVE DIRECTORY”") keeps the items whose names hold a no-break
|
|
219
|
+
space or other whitespace, and a space typed at the end does not matter
|
|
220
|
+
([#159](https://github.com/eizedev/pivotkit/issues/159)).
|
|
221
|
+
- The search of a field's item list and of a grouping's item picker finds an item whose label holds
|
|
222
|
+
a no-break space or another run of whitespace when a plain space is typed, and ignores spaces
|
|
223
|
+
typed at the ends ([#159](https://github.com/eizedev/pivotkit/issues/159)). Both searches fold
|
|
224
|
+
text with pivotkit-core's `foldText`.
|
|
225
|
+
|
|
226
|
+
## [0.4.0] - 2026-11-11
|
|
227
|
+
|
|
228
|
+
### Added
|
|
229
|
+
|
|
230
|
+
- Loading data in the browser ([#44](https://github.com/eizedev/pivotkit/issues/44)), with the new
|
|
231
|
+
prop `allowImport` (off by default): a **Data** button before Views (under More on a narrow report)
|
|
232
|
+
with the data source (name, rows × columns), **Load data…** and **Back to original data**; a file
|
|
233
|
+
dropped onto the report, with an overlay while it is dragged; a preview before the data is
|
|
234
|
+
replaced: the sheet of a workbook, the first rows, a type per column (Text, Number, Date, Yes/No),
|
|
235
|
+
the readers' notes, progress and **Cancel** while it reads, Escape to cancel. A file that cannot be
|
|
236
|
+
read keeps the data and says why with the reader's message. Loading is a step of the undo history
|
|
237
|
+
(Undo and Redo move between the data sets with their own views, up to three kept); a dot on Data
|
|
238
|
+
and a line under the result name the file while its data is shown. The empty report offers to load a
|
|
239
|
+
file ("Load data to start" without data). Texts in English and German (`labels.dataImport`).
|
|
240
|
+
- `plugins`: reader plugins of `pivotkit-core/import` (pivotkit-xlsx for Excel workbooks);
|
|
241
|
+
`onDataLoad`: every change of the data shown (`cause` "load", "original", "undo", "redo"; returning
|
|
242
|
+
`false` refuses a file); `importWorker`: a module worker (the new entry `pivotkit-react/import-worker`)
|
|
243
|
+
that reads CSV and JSON off the page, with the page as the fallback.
|
|
244
|
+
- While a file's data is shown the report's source is the file's: its name and the first 16 hex digits
|
|
245
|
+
of the SHA-256 of its name and column names, so the browser store keeps views per file.
|
|
246
|
+
- A report mounted again by its host ([#131](https://github.com/eizedev/pivotkit/issues/131)), as
|
|
247
|
+
PowerShell Universal does on its light/dark switch and on `Sync-UDElement`, shows the loaded file
|
|
248
|
+
again with its view and its undo steps, when it has the same `storageKey` and the host's data is
|
|
249
|
+
the same (`dataKey`, else its columns, and `source`). Kept in the page's memory only, never in
|
|
250
|
+
browser storage, for up to four reports; let go when the host's data is shown again. `onDataLoad`
|
|
251
|
+
hears it as `cause` "restore".
|
|
252
|
+
- `data` takes columnar data (`{ columns, types, data }`), as pivotkit-core's `encode` does.
|
|
253
|
+
- The import UI is a file of its own, `dist/import-ui.js` (with `pivotkit-core/import`, which this
|
|
254
|
+
release needs from pivotkit-core), loaded on its first use; the first load keeps the Data button and
|
|
255
|
+
the drop handler.
|
|
256
|
+
|
|
257
|
+
- Identifier fields ([#113](https://github.com/eizedev/pivotkit/issues/113)): a number field of whole numbers whose name ends in the word ID, Nr,
|
|
258
|
+
No, Number, Key or "#" ("ID", "CustomerId", "customer_id", "Order No", "Serial #", "userID2", "ID
|
|
259
|
+
(Asset)"; not "Paid", "UUID" or "Number of items"), for which
|
|
260
|
+
`fieldDefaults` sets none of `agg`, `format` and `drillFormat`, is counted when it is added to
|
|
261
|
+
Values (from the field list, by a drag or by Move to; Sum stays a choice) and shows its numbers as
|
|
262
|
+
they are in the drill-down (27000, not 27,000). Any of the three entries overrides it.
|
|
263
|
+
- The token `--pk-layer-z` (default `50`): the z-index of the layer of menus, sheets and popups in a
|
|
264
|
+
browser without the Popover API ([#111](https://github.com/eizedev/pivotkit/issues/111)).
|
|
265
|
+
- The host's own view (`view`, else the first `defaultView`) is warned about like a loaded view when
|
|
266
|
+
the data cannot use parts of it, once per distinct view, not while `loading` ([#83](https://github.com/eizedev/pivotkit/issues/83)).
|
|
267
|
+
|
|
268
|
+
### Changed
|
|
269
|
+
|
|
270
|
+
- UI: **Start over** in the toolbar, a menu button after Undo and Redo, replaces the Reset button. It
|
|
271
|
+
holds **Reset** ("Back to the start view. Your data stays.") and **New, empty report** ("No fields.
|
|
272
|
+
Undo brings it back. Your data stays."), each greyed out with its reason ("Already at the start
|
|
273
|
+
view.", "The report is empty already."); Reset is also off when the start view is the empty report
|
|
274
|
+
("The start view is empty: use New, empty report."). When both are off, Start over itself is off
|
|
275
|
+
(focusable, `aria-disabled`, with the reason "The report is empty already." as its description
|
|
276
|
+
and tooltip). Enter, Space or the down arrow opens it. In
|
|
277
|
+
More, Reset and New are entries of their own. The test id `reset` is now Reset's entry in that menu
|
|
278
|
+
(`start-over` is the button; `new-report` and `more-new-report` New's), so a host's test that
|
|
279
|
+
clicked `reset` opens Start over first. New labels `startOver`, `resetAlready`, `resetStartEmpty`,
|
|
280
|
+
`newHint`; `resetHint` is the new longer text; `newAlready` is a first-load text now
|
|
281
|
+
([#88](https://github.com/eizedev/pivotkit/issues/88)).
|
|
282
|
+
- UI: the Views menu holds what persists, in four groups: This view (Save, Save as…), Shared views,
|
|
283
|
+
My views, Share this view (Copy link, Copy view as JSON, Download view, Open view file…), with no
|
|
284
|
+
Share level in between. "New, empty report" left it for Start over; "Load view…" reads "Open view
|
|
285
|
+
file…" (the label `loadView`; German "Ansichtsdatei öffnen…"), its level "Views › Open view file".
|
|
286
|
+
The labels `share` and `settingInfo.newReport` are gone.
|
|
287
|
+
- UI: every menu draws its groups alike: each group's title in bold, as Export's, with a rule between
|
|
288
|
+
one group and the next (Options, Views, the chart type, More, a chip menu's levels such as "More
|
|
289
|
+
statistics"); More has rules only; the chart's Display parts its own groups (Value labels, Legend,
|
|
290
|
+
Title, ...) with a dashed rule, each a named group for a screen reader. One component draws them
|
|
291
|
+
(`Group` in popover.jsx) ([#105](https://github.com/eizedev/pivotkit/issues/105)).
|
|
292
|
+
- An item of a toolbar menu (Start over, More) that is greyed out stays reachable with the arrow keys
|
|
293
|
+
(`aria-disabled`), so a screen reader hears its reason.
|
|
294
|
+
- Reset's note "Back to the start view" has **Undo**, as New's has. In More, a letter jumps to the
|
|
295
|
+
next entry that starts with it, as in the other menus, and Layout is a checkbox item
|
|
296
|
+
(`menuitemcheckbox`), not one of a set of choices.
|
|
297
|
+
|
|
298
|
+
### Fixed
|
|
299
|
+
|
|
300
|
+
- A loaded file shown again after a new mount lost its view when the host mounted the report twice in
|
|
301
|
+
a row (PowerShell Universal's `Sync-UDElement`, two mounts within about 30 ms) or mounted it again
|
|
302
|
+
before it passed back a view it was told: the report now starts on the kept view history at once,
|
|
303
|
+
and keeps the view it told a host that controls the view, not the host's view from before
|
|
304
|
+
([#135](https://github.com/eizedev/pivotkit/issues/135)).
|
|
305
|
+
- Toolbar buttons moved into More although the free room would hold some of them (a report about
|
|
306
|
+
1,000 px wide showed Reset, Layout and Options in More next to a wide gap). A button moves now only
|
|
307
|
+
when the room left cannot hold it: the room is measured with the texts of the report's language
|
|
308
|
+
(not the longest of every language), and a button that fits stays even when one before it in the
|
|
309
|
+
order had to go. The chart type keeps the room of its longest type, so picking one never moves a
|
|
310
|
+
button, and while a toolbar menu is open nothing moves (a language change keeps the menu, its
|
|
311
|
+
button and its focus). The order is Layout, Options, the chart type, then Start over (where New is) and Views
|
|
312
|
+
last; More lists them in groups
|
|
313
|
+
([#88](https://github.com/eizedev/pivotkit/issues/88)).
|
|
314
|
+
- Menus, bottom sheets and "i" popups opened by a click open in the browser's top layer
|
|
315
|
+
(`popover="manual"`; a description shown on hover stays in the report's layer): a host's
|
|
316
|
+
fixed navigation above z-index 50 (PowerShell Universal's drawer at 1200) no longer covers the left
|
|
317
|
+
of a sheet or an "About" popup at 800 px or less ([#111](https://github.com/eizedev/pivotkit/issues/111)). They stay in the report's DOM, so its
|
|
318
|
+
tokens and the web component's shadow styles apply; Tab inside them is moved by the report (WebKit
|
|
319
|
+
left a top-layer popover for the page's body), past the last control a popover closes and the
|
|
320
|
+
focus goes back to its button.
|
|
321
|
+
- A large table scrolls in one box: the screen reader texts of empty cells no longer made the result
|
|
322
|
+
area scroll as well, with two scroll bars side by side ([#112](https://github.com/eizedev/pivotkit/issues/112)).
|
|
323
|
+
- A virtual table's row label column (300 rows or more) keeps its width while the table scrolls:
|
|
324
|
+
measured per view and data over its 50 longest labels in the table's own font (again when the font,
|
|
325
|
+
its size or a web font changes), at most 28em, a longer label cut with "…" and whole in its tooltip
|
|
326
|
+
([#110](https://github.com/eizedev/pivotkit/issues/110), [#121](https://github.com/eizedev/pivotkit/issues/121)).
|
|
327
|
+
- Tab in a bottom sheet: one Tab from a chip menu's first level closes it and moves on from its chip;
|
|
328
|
+
a level with fields keeps Tab inside the sheet (Chromium let it out to the page). One definition of
|
|
329
|
+
a Tab stop for every layer (`tabStops`).
|
|
330
|
+
- Field names in the field list break between words only; a word too long for its line ends in "…"
|
|
331
|
+
([#114](https://github.com/eizedev/pivotkit/issues/114)). The field list is wider (`--pk-panel-w`
|
|
332
|
+
288 px, at most 284 px on a medium report; it was 268 and 244) and a field's menu button takes the
|
|
333
|
+
least room a control may (24 px), so a name of up to about 16 characters fits next to its zone mark.
|
|
334
|
+
- A description opened on a narrow report is a bottom sheet as wide as the window, not a 320 px box.
|
|
335
|
+
- Every `input`, `select` and `textarea` has a `name` of its own report (unique also across two web
|
|
336
|
+
components on a page) and a label; Chrome listed them as form fields without an id or name
|
|
337
|
+
([#115](https://github.com/eizedev/pivotkit/issues/115)).
|
|
338
|
+
- A line of the warning about a view's unused parts goes once its part of the view is changed by
|
|
339
|
+
hand, and comes back with Undo ([#82](https://github.com/eizedev/pivotkit/issues/82)).
|
|
340
|
+
- A modal layer (the file preview, the drill-down, the field drawer) whose first frame comes late
|
|
341
|
+
(WebKit) no longer takes the focus back from a control inside it: **Load data** keeps the focus once
|
|
342
|
+
the first rows are read, and the sheet list keeps it after a sheet over the limits
|
|
343
|
+
([#136](https://github.com/eizedev/pivotkit/issues/136)).
|
|
344
|
+
|
|
9
345
|
## [0.3.0] - 2026-11-09
|
|
10
346
|
|
|
11
347
|
### Added
|
|
@@ -599,7 +935,9 @@ First release.
|
|
|
599
935
|
weather (Open-Meteo), countries (World Bank), earthquakes (USGS), Nobel laureates and the release
|
|
600
936
|
cycles of software products (endoflife.date).
|
|
601
937
|
|
|
602
|
-
[Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.
|
|
938
|
+
[Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.5.0...HEAD
|
|
939
|
+
[0.5.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.4.0...pivotkit-react@0.5.0
|
|
940
|
+
[0.4.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.3.0...pivotkit-react@0.4.0
|
|
603
941
|
[0.3.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.2.0...pivotkit-react@0.3.0
|
|
604
942
|
[0.2.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.1.0...pivotkit-react@0.2.0
|
|
605
943
|
[0.1.0]: https://github.com/eizedev/pivotkit/releases/tag/pivotkit-react@0.1.0
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The pivot report builder of [pivotkit](https://pivotkit.eize.dev/) as a React 18
|
|
|
4
4
|
`<PivotReport>`: a searchable field list, four drop zones (Rows, Columns, Values, Filters) with drag
|
|
5
5
|
and drop and a menu on every field, table and chart (Apache ECharts), filters with value counts,
|
|
6
6
|
drill-down to the rows behind a value, undo and redo, saved and shared views as JSON files, and
|
|
7
|
-
Excel, CSV
|
|
7
|
+
Excel, CSV, HTML report, PNG and SVG export and printing. Excel's PivotTable is the reference; the engine is
|
|
8
8
|
[pivotkit-core](https://www.npmjs.com/package/pivotkit-core).
|
|
9
9
|
|
|
10
10
|

|
|
@@ -26,7 +26,7 @@ npm install pivotkit-react react react-dom echarts
|
|
|
26
26
|
|
|
27
27
|
TypeScript declarations are included. pivotkit-core (a caret range) and @dnd-kit come with the
|
|
28
28
|
package. In 0.x a caret range spans patch
|
|
29
|
-
versions only (`^0.
|
|
29
|
+
versions only (`^0.y.z` is 0.y.z and later 0.y patches): an app that also imports pivotkit-core itself must use a version
|
|
30
30
|
inside that range, since npm shares one copy only when the ranges overlap.
|
|
31
31
|
|
|
32
32
|
## Example
|