pivotkit-react 0.2.0 → 0.4.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 (64) hide show
  1. package/CHANGELOG.md +284 -1
  2. package/README.md +1 -1
  3. package/dist/chunks/{chunk-F6MVUAQD.js → chunk-6MDAL3IO.js} +51 -3
  4. package/dist/chunks/{chunk-53ZMK4BH.js → chunk-EM23V5GH.js} +6 -0
  5. package/dist/chunks/{chunk-LQCWFJBS.js → chunk-LEN5RPBM.js} +147 -26
  6. package/dist/chunks/{chunk-OYY4BKIL.js → chunk-RWYHJRQO.js} +6 -0
  7. package/dist/chunks/{chunk-QBD4FOBB.js → chunk-WB4GKWFQ.js} +124 -18
  8. package/dist/chunks/chunk-XN55BQ4M.js +618 -0
  9. package/dist/chunks/{chunk-X7H7BAVT.js → chunk-YITKWZ4L.js} +312 -628
  10. package/dist/chunks/chunk-ZYEYZSYL.js +187 -0
  11. package/dist/chunks/{unused-texts-YTNJCFFC.js → unused-texts-K3VFH65P.js} +1 -1
  12. package/dist/chunks/{unused-texts-de-SGOHV4N7.js → unused-texts-de-OW4TGIVX.js} +1 -1
  13. package/dist/import-ui.js +769 -0
  14. package/dist/import-worker.js +20 -0
  15. package/dist/index.js +653 -227
  16. package/dist/labels.js +14 -10
  17. package/dist/menu-texts-de.js +1 -1
  18. package/dist/menus.js +2499 -676
  19. package/dist/styles.css +673 -125
  20. package/package.json +3 -2
  21. package/types/chip-menus.d.ts +20 -4
  22. package/types/data-history.d.ts +85 -0
  23. package/types/data-keep.d.ts +51 -0
  24. package/types/data-menu.d.ts +11 -0
  25. package/types/dnd.d.ts +8 -4
  26. package/types/dom.d.ts +40 -7
  27. package/types/field-info.d.ts +32 -0
  28. package/types/filter-level.d.ts +16 -0
  29. package/types/filter.d.ts +31 -0
  30. package/types/help.d.ts +0 -7
  31. package/types/import-host.d.ts +53 -0
  32. package/types/import-labels.d.ts +360 -0
  33. package/types/import-module.d.ts +2 -0
  34. package/types/import-run.d.ts +73 -0
  35. package/types/import-source.d.ts +32 -0
  36. package/types/import-steps.d.ts +121 -0
  37. package/types/import-ui.d.ts +108 -0
  38. package/types/import-worker.d.ts +1 -0
  39. package/types/index.d.ts +56 -4
  40. package/types/labels.d.ts +97 -2
  41. package/types/lazy-import.d.ts +4 -0
  42. package/types/lazy-menus.d.ts +2 -2
  43. package/types/levels.d.ts +106 -0
  44. package/types/menu-fields.d.ts +80 -0
  45. package/types/menu-labels.d.ts +214 -22
  46. package/types/menu-ops.d.ts +150 -9
  47. package/types/menu-topics.d.ts +291 -0
  48. package/types/menus.d.ts +2 -1
  49. package/types/names.d.ts +141 -1
  50. package/types/overflow.d.ts +29 -17
  51. package/types/place.d.ts +44 -0
  52. package/types/popover.d.ts +47 -5
  53. package/types/section.d.ts +8 -11
  54. package/types/tips.d.ts +1 -36
  55. package/types/toasts.d.ts +1 -1
  56. package/types/toolbar-panels.d.ts +17 -9
  57. package/types/unused-keep.d.ts +20 -0
  58. package/types/unused-texts.d.ts +6 -0
  59. package/types/unused.d.ts +1 -0
  60. package/types/use-view-history.d.ts +13 -4
  61. package/types/view-ops.d.ts +12 -0
  62. package/types/virtual.d.ts +15 -0
  63. package/types/zones.d.ts +5 -4
  64. package/types/sections.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,287 @@ All notable changes to `pivotkit-react` are documented in this file. The format
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.4.0] - 2026-11-11
10
+
11
+ ### Added
12
+
13
+ - Loading data in the browser ([#44](https://github.com/eizedev/pivotkit/issues/44)), with the new
14
+ prop `allowImport` (off by default): a **Data** button before Views (under More on a narrow report)
15
+ with the data source (name, rows × columns), **Load data…** and **Back to original data**; a file
16
+ dropped onto the report, with an overlay while it is dragged; a preview before the data is
17
+ replaced: the sheet of a workbook, the first rows, a type per column (Text, Number, Date, Yes/No),
18
+ the readers' notes, progress and **Cancel** while it reads, Escape to cancel. A file that cannot be
19
+ read keeps the data and says why with the reader's message. Loading is a step of the undo history
20
+ (Undo and Redo move between the data sets with their own views, up to three kept); a dot on Data
21
+ and a line under the result name the file while its data is shown. The empty report offers to load a
22
+ file ("Load data to start" without data). Texts in English and German (`labels.dataImport`).
23
+ - `plugins`: reader plugins of `pivotkit-core/import` (pivotkit-xlsx for Excel workbooks);
24
+ `onDataLoad`: every change of the data shown (`cause` "load", "original", "undo", "redo"; returning
25
+ `false` refuses a file); `importWorker`: a module worker (the new entry `pivotkit-react/import-worker`)
26
+ that reads CSV and JSON off the page, with the page as the fallback.
27
+ - While a file's data is shown the report's source is the file's: its name and the first 16 hex digits
28
+ of the SHA-256 of its name and column names, so the browser store keeps views per file.
29
+ - A report mounted again by its host ([#131](https://github.com/eizedev/pivotkit/issues/131)), as
30
+ PowerShell Universal does on its light/dark switch and on `Sync-UDElement`, shows the loaded file
31
+ again with its view and its undo steps, when it has the same `storageKey` and the host's data is
32
+ the same (`dataKey`, else its columns, and `source`). Kept in the page's memory only, never in
33
+ browser storage, for up to four reports; let go when the host's data is shown again. `onDataLoad`
34
+ hears it as `cause` "restore".
35
+ - `data` takes columnar data (`{ columns, types, data }`), as pivotkit-core's `encode` does.
36
+ - The import UI is a file of its own, `dist/import-ui.js` (with `pivotkit-core/import`, which this
37
+ release needs from pivotkit-core), loaded on its first use; the first load keeps the Data button and
38
+ the drop handler.
39
+
40
+ - Identifier fields ([#113](https://github.com/eizedev/pivotkit/issues/113)): a number field of whole numbers whose name ends in the word ID, Nr,
41
+ No, Number, Key or "#" ("ID", "CustomerId", "customer_id", "Order No", "Serial #", "userID2", "ID
42
+ (Asset)"; not "Paid", "UUID" or "Number of items"), for which
43
+ `fieldDefaults` sets none of `agg`, `format` and `drillFormat`, is counted when it is added to
44
+ Values (from the field list, by a drag or by Move to; Sum stays a choice) and shows its numbers as
45
+ they are in the drill-down (27000, not 27,000). Any of the three entries overrides it.
46
+ - The token `--pk-layer-z` (default `50`): the z-index of the layer of menus, sheets and popups in a
47
+ browser without the Popover API ([#111](https://github.com/eizedev/pivotkit/issues/111)).
48
+ - The host's own view (`view`, else the first `defaultView`) is warned about like a loaded view when
49
+ the data cannot use parts of it, once per distinct view, not while `loading` ([#83](https://github.com/eizedev/pivotkit/issues/83)).
50
+
51
+ ### Changed
52
+
53
+ - UI: **Start over** in the toolbar, a menu button after Undo and Redo, replaces the Reset button. It
54
+ holds **Reset** ("Back to the start view. Your data stays.") and **New, empty report** ("No fields.
55
+ Undo brings it back. Your data stays."), each greyed out with its reason ("Already at the start
56
+ view.", "The report is empty already."); Reset is also off when the start view is the empty report
57
+ ("The start view is empty: use New, empty report."). When both are off, Start over itself is off
58
+ (focusable, `aria-disabled`, with the reason "The report is empty already." as its description
59
+ and tooltip). Enter, Space or the down arrow opens it. In
60
+ More, Reset and New are entries of their own. The test id `reset` is now Reset's entry in that menu
61
+ (`start-over` is the button; `new-report` and `more-new-report` New's), so a host's test that
62
+ clicked `reset` opens Start over first. New labels `startOver`, `resetAlready`, `resetStartEmpty`,
63
+ `newHint`; `resetHint` is the new longer text; `newAlready` is a first-load text now
64
+ ([#88](https://github.com/eizedev/pivotkit/issues/88)).
65
+ - UI: the Views menu holds what persists, in four groups: This view (Save, Save as…), Shared views,
66
+ My views, Share this view (Copy link, Copy view as JSON, Download view, Open view file…), with no
67
+ Share level in between. "New, empty report" left it for Start over; "Load view…" reads "Open view
68
+ file…" (the label `loadView`; German "Ansichtsdatei öffnen…"), its level "Views › Open view file".
69
+ The labels `share` and `settingInfo.newReport` are gone.
70
+ - UI: every menu draws its groups alike: each group's title in bold, as Export's, with a rule between
71
+ one group and the next (Options, Views, the chart type, More, a chip menu's levels such as "More
72
+ statistics"); More has rules only; the chart's Display parts its own groups (Value labels, Legend,
73
+ Title, ...) with a dashed rule, each a named group for a screen reader. One component draws them
74
+ (`Group` in popover.jsx) ([#105](https://github.com/eizedev/pivotkit/issues/105)).
75
+ - An item of a toolbar menu (Start over, More) that is greyed out stays reachable with the arrow keys
76
+ (`aria-disabled`), so a screen reader hears its reason.
77
+ - Reset's note "Back to the start view" has **Undo**, as New's has. In More, a letter jumps to the
78
+ next entry that starts with it, as in the other menus, and Layout is a checkbox item
79
+ (`menuitemcheckbox`), not one of a set of choices.
80
+
81
+ ### Fixed
82
+
83
+ - A loaded file shown again after a new mount lost its view when the host mounted the report twice in
84
+ a row (PowerShell Universal's `Sync-UDElement`, two mounts within about 30 ms) or mounted it again
85
+ before it passed back a view it was told: the report now starts on the kept view history at once,
86
+ and keeps the view it told a host that controls the view, not the host's view from before
87
+ ([#135](https://github.com/eizedev/pivotkit/issues/135)).
88
+ - Toolbar buttons moved into More although the free room would hold some of them (a report about
89
+ 1,000 px wide showed Reset, Layout and Options in More next to a wide gap). A button moves now only
90
+ when the room left cannot hold it: the room is measured with the texts of the report's language
91
+ (not the longest of every language), and a button that fits stays even when one before it in the
92
+ order had to go. The chart type keeps the room of its longest type, so picking one never moves a
93
+ button, and while a toolbar menu is open nothing moves (a language change keeps the menu, its
94
+ button and its focus). The order is Layout, Options, the chart type, then Start over (where New is) and Views
95
+ last; More lists them in groups
96
+ ([#88](https://github.com/eizedev/pivotkit/issues/88)).
97
+ - Menus, bottom sheets and "i" popups opened by a click open in the browser's top layer
98
+ (`popover="manual"`; a description shown on hover stays in the report's layer): a host's
99
+ fixed navigation above z-index 50 (PowerShell Universal's drawer at 1200) no longer covers the left
100
+ 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
101
+ tokens and the web component's shadow styles apply; Tab inside them is moved by the report (WebKit
102
+ left a top-layer popover for the page's body), past the last control a popover closes and the
103
+ focus goes back to its button.
104
+ - A large table scrolls in one box: the screen reader texts of empty cells no longer made the result
105
+ area scroll as well, with two scroll bars side by side ([#112](https://github.com/eizedev/pivotkit/issues/112)).
106
+ - A virtual table's row label column (300 rows or more) keeps its width while the table scrolls:
107
+ measured per view and data over its 50 longest labels in the table's own font (again when the font,
108
+ its size or a web font changes), at most 28em, a longer label cut with "…" and whole in its tooltip
109
+ ([#110](https://github.com/eizedev/pivotkit/issues/110), [#121](https://github.com/eizedev/pivotkit/issues/121)).
110
+ - Tab in a bottom sheet: one Tab from a chip menu's first level closes it and moves on from its chip;
111
+ a level with fields keeps Tab inside the sheet (Chromium let it out to the page). One definition of
112
+ a Tab stop for every layer (`tabStops`).
113
+ - Field names in the field list break between words only; a word too long for its line ends in "…"
114
+ ([#114](https://github.com/eizedev/pivotkit/issues/114)). The field list is wider (`--pk-panel-w`
115
+ 288 px, at most 284 px on a medium report; it was 268 and 244) and a field's menu button takes the
116
+ least room a control may (24 px), so a name of up to about 16 characters fits next to its zone mark.
117
+ - A description opened on a narrow report is a bottom sheet as wide as the window, not a 320 px box.
118
+ - Every `input`, `select` and `textarea` has a `name` of its own report (unique also across two web
119
+ components on a page) and a label; Chrome listed them as form fields without an id or name
120
+ ([#115](https://github.com/eizedev/pivotkit/issues/115)).
121
+ - A line of the warning about a view's unused parts goes once its part of the view is changed by
122
+ hand, and comes back with Undo ([#82](https://github.com/eizedev/pivotkit/issues/82)).
123
+ - A modal layer (the file preview, the drill-down, the field drawer) whose first frame comes late
124
+ (WebKit) no longer takes the focus back from a control inside it: **Load data** keeps the focus once
125
+ the first rows are read, and the sheet list keeps it after a sheet over the limits
126
+ ([#136](https://github.com/eizedev/pivotkit/issues/136)).
127
+
128
+ ## [0.3.0] - 2026-11-09
129
+
130
+ ### Added
131
+
132
+ - The Filter level rebuilt. A summary card that stays in view: what the table shows of the field in
133
+ bold ("3 of 12 months shown", "Nothing shown" in red), why the rest does not, each reason with its
134
+ count ("9 left out by your picks", "24 outside last 2 years (2025; 2026 has no data)", "11 left out
135
+ by the rule"), with nothing shown the one reason and the nearest totals ("No month has a total
136
+ Average of Mean °C that is greater than 25 – the totals go from 13.4 (Jan) to 22.2 (Jul)."), the
137
+ rows and the data's dates; **Reset filter**. Three sections that fold, with their state on the
138
+ header and Clear or Remove beside it: **Quick choices** (a date along the time line only; only the
139
+ choices that keep a row, each with the data's share of its days and its rows, a line naming the
140
+ ones not offered, counts that start where the data end, Last [N] days for a date field, and
141
+ **Counted back from** today or the latest record when the data end before the current period, saved
142
+ as the filter's `anchor`), **Years combined** instead for a grouping that repeats every year (a
143
+ toggle per year of the data, written as whole-year comparisons on the dates), **Pick items** (the
144
+ items a rule leaves out in a folded tail group, their ticks kept) and **Rules** (an "i" per rule
145
+ with what it compares and an example - the total's names its Grand Total scope -, a line under
146
+ each with what it keeps, the quick choice among them as a line to read, not a rule; a searchable
147
+ list instead of a native select for a grouping with more than twelve items). The first rule or
148
+ quick choice opens Rules and folds Pick items, the last one going does the reverse, a fold by hand
149
+ wins afterwards; on a phone one of them is open at a time. A quick choice says the data's share on
150
+ the chip and the menu's first level too ("last 2 years (2025; 2026 has no data)", "last 12 months
151
+ to Dec 2025"); the chip says Years combined as years ("2024 to 2025"). New labels (`summary*`,
152
+ `nouns`, `quickRows`, `quickHidden`, `anchor*`, `yearsCombined*`, `pickItems`, `picksState`,
153
+ `rulesState`, `tailOut`, `ruleKeeps*`, `ruleInfo`, `scope*`, `picker*`, `relativeTo`, `withShare`,
154
+ `noData`, `summaryQuickOnly` and more); gone: `moreFilters`, `itemsPicked`, `itemsShown*`, `pickedPlus`, `ruleOut`,
155
+ `quickCustom`, `conditionOnNames`, `removeConditions`. New tokens `--pk-danger-soft` and
156
+ `--pk-warn`. Text actions in the menus (Reset filter, Clear, Remove, Select all, "change it above")
157
+ are quiet buttons, disabled while they would change nothing. The data range in the footer and the
158
+ axis title and the Group level's names come in a separate change.
159
+ - Filter rules ([#89](https://github.com/eizedev/pivotkit/issues/89),
160
+ [#90](https://github.com/eizedev/pivotkit/issues/90)). The Filter level of a date field (or a
161
+ grouping of one) starts with quick choices: All, This year, Last [N] years and, unless it is
162
+ grouped by year or quarter, Last [N] months, each with the days it keeps ("2022–2026"), relative to
163
+ today in the data's time zone; "Custom rules" while the rules hold more. Under "More ways to
164
+ filter" a rule editor: sentences that all apply together, added and removed one by one, each
165
+ applied once complete: the item itself compared ("Released by year is from 2022", for dates also
166
+ "is in the last N years"), its total compared ("Count of Released is greater than 3"; "Count of
167
+ rows" with nothing in Values) and a rule on its name. The chip, the menu's first level and the
168
+ level say the same words: "last 5 years (2022–2026)", "from 2022", "Count of rows > 3".
169
+ - A field in Filters opens a menu of its own with the same Filter level (Filter, Move to, Remove
170
+ field) instead of the filter popover.
171
+ - The menu search finds the rules ("rule"), the quick choices with the count typed ("last 3
172
+ years") and a year compared ("from 2022"), and applies them at once.
173
+
174
+ ### Changed
175
+
176
+ - A quick choice replaces the field's relative ranges only: its comparisons stay as rules, and
177
+ "Remove" beside Rules keeps the quick choice. "Last [N] years" starts at 2 ("Last 1 year" is This
178
+ year); a month-of-the-year grouping (and the other groupings that repeat every year) has no quick
179
+ choices.
180
+ - The text condition and the condition on a value of the Filter level are rules now: each is added
181
+ with its button and taken away with its ×; "is anything" and "No condition" are gone. "Remove the
182
+ conditions" is "Remove the rules" and takes the quick choice of a date too.
183
+ - A sort, Top items or a value condition by the row count the view does not show is named "Count
184
+ of rows" ("Anzahl der Zeilen").
185
+ - The filter popover is only the field list's "Filter…" of a field not placed yet, so its "Remove
186
+ filter" is gone (with the label `removeFilter`).
187
+ - The menus of a chip and Options are in levels instead of long accordions. The first level is a
188
+ short summary: one row per topic with what is set on its right ("Filter · All", "Top items · Off",
189
+ "Number format · ● Currency"; the dot and ", changed" in its accessible name where it is not the
190
+ default), or a topic's few choices right there (A to Z and Z to A, a value's Highlight, the totals
191
+ and help switches). A row opens the topic's own level in place, titled with the field ("Month ›
192
+ Group"), with **‹ Back**. The first level and the levels of choices are ARIA menus (WAI-ARIA
193
+ Authoring Practices: one Tab stop, arrow keys, Home and End, type-ahead; Enter or the right arrow
194
+ into a level, Escape or the left arrow back to the row it came from, Escape on the first level
195
+ closes the menu, Tab closes it and moves on); a level with form controls is a group with its
196
+ heading. A search above a chip menu's first level finds a choice of any level, with its path.
197
+ - Every choice in these menus applies at once, without Apply: the values of the Filter level (in a
198
+ chip's menu; the filter popover of a Filters chip keeps its draft and Apply), the text condition and
199
+ the numbers a moment after the typing stops (or with Enter), a value's name with Enter or when the
200
+ field is left; Escape in a field gives back what applies. Number ranges keep Apply (size and start
201
+ apply together).
202
+ - The Filter level of a field: how many items the list keeps, **Remove filter** (now also taking the
203
+ value condition; Top N stays), the values with their counts, the condition on the names, and the
204
+ condition on a value as a sentence ("Keep Region items whose Sum of Revenue is greater than …";
205
+ "is anything" takes it off). The Top items level: Off, Top 3, Top 5, Top 10, or **Top N…** with Top
206
+ or Bottom and a count. The Group level of a date: one column, each unit's example on its right,
207
+ under "Along the time line" and "Same period every year". Sorting by a value: on the first level
208
+ for one value, else in the level **Sort by value**.
209
+ - Options: the totals and help switches are menu items (`menuitemcheckbox`); one that would change
210
+ nothing is `aria-disabled` with its reason, so the arrow keys still reach it; the "i" next to a
211
+ total is for the pointer, its text is the item's description; Keyboard shortcuts is a level.
212
+ - The Views menu is in levels too: its first level is the flat list to scan (This view with Save “…”,
213
+ Save as… and New, Shared views, My views, Share); Save as…, Share (copy link, copy JSON, download,
214
+ Load view…) and the questions before a delete, a publish or a Save over a shared view open levels of
215
+ their own. An entry's Publish and Delete are items next to it, reached by the arrow keys; after a
216
+ delete the focus goes to the entry that takes its place.
217
+ - The Views menu's **Share** row sits under a group heading of its own, **Share this view** (German
218
+ "Diese Ansicht teilen"), like This view, Shared views and My views, so it is not lost under the lists.
219
+ - No menu folds any more: the chart type menu (its Display settings shown at once) and the Export
220
+ menus are flat lists in titled groups. The folding (`SECTIONS`, `open:<section>` and
221
+ `closed:<section>` in the tips' list) and **Reset menu sections** are gone; a stored state of a
222
+ section is dropped when the list is read, and `dismissedTips` and `onTipDismiss` carry only tips and
223
+ switches.
224
+ - After a usability review: the Filter level shows the list first and folds "More ways to filter"
225
+ (the text condition and the condition on a value) each time it opens; its first line names the
226
+ conditions; Clear picks and Remove the conditions replace Remove filter there; the comparison has a
227
+ line of its own. A typed name, count or number applies when the menu closes from a click outside.
228
+ The search knows "percent", "%", "rename", "top 5" and the two conditions, and `/` goes to it. A
229
+ format the menu does not offer (number:1) is a checked entry by its name. The levels of choices are
230
+ one column, the chip menus 420 px wide. The Sort row names a sort by a value; the menu's head names
231
+ the field as its levels do; Expand all has a neutral icon; Select all and the Filter level's
232
+ actions are underlined. A popover keeps its side while its content changes.
233
+ - A menu whose entries are all off (the Export menu of an empty report) no longer puts the focus on
234
+ its first "i", whose explanation opened over the entries; the menu takes the focus itself.
235
+ - Text fields, searches and selects in the menus have an edge of 3:1 contrast in both themes: the new
236
+ token `--pk-input-border`.
237
+ - Labels of the menus (a host's `labels` for them): new `shareThisView`, `back`, `backTo`, `levelTitle`, `searchMenu`,
238
+ `searchMenuShort`, `searchResults`, `searchNothing`, `sortByValue`, `sortOldestShort`,
239
+ `sortNewestShort`, `filterTopic`, `filterAll`, `groupTopic`, `groupNoneShort`, `off`,
240
+ `moveToTitle`, `topOwn`, `binsOff`, `itemsPicked`, `valueConditionTitle`, `keepWhose`,
241
+ `valueOpAny`, `nameHint`, `showAsKeywords`, `nameKeywords`, `filterKeywords`, `formatDecimals`,
242
+ `pickedPlus`, `conditionOnNames`, `conditionOnValue`, `listAnd`, `clearPicks`, `removeConditions`,
243
+ `moreFilters`; changed: `valueOps` is the comparison inside the sentence ("is greater
244
+ than", German "größer als"), `groupCyclic` reads "Same period every year"; gone (no longer shown):
245
+ `chooseValues`, `valueFilter`, `change`, `removeSetting`, `topStart`, `binsStart`, `filterIs`,
246
+ `groupBy`, `resetSections`, `resetSectionsDone`. A host's text for a key that is gone is ignored.
247
+
248
+ ### Fixed
249
+
250
+ - A press inside a menu that a chip or a field opened no longer drags that chip or field: selecting
251
+ text in the menu, pressing a native select of a rule, or a click that moves a little (Clear picks
252
+ over the Values zone) moved the field to another zone and lost its filters. The menu is rendered
253
+ through a portal, and React passed its mouse and touch events up to the chip's drag listeners;
254
+ they now take only events from the chip's or field's own elements.
255
+ - Filter rules after review: a rule on the names shows its words on the chip ("contains “linux”");
256
+ the pick list marks the items the field's rules leave out and the first line counts what shows
257
+ ("2 of 36 items shown: last 2 years (2025–2026)"); the quick choices follow Undo; a count above
258
+ 500 says so; a new rule and the opened rules scroll into view; a narrow chip cuts the rule, not the
259
+ field's name; "is not" says blank items are not kept; counts of one have their own words ("Letztes
260
+ 1 Jahr", "im letzten 1 Monat"); the rule on a total names the items ("Region items whose …"); the
261
+ search offers "from 2022" for a grouping by year only. The labels `labelOps` load first now (the
262
+ chip says them).
263
+ - On a touch screen the field list keeps its desktop rows: the grip, the "i" and the menu of a
264
+ field keep their size and get a hit area 44 px high instead (the grip's 44 px wide), within their
265
+ own row; they made every row 44 px or more high and broke names such as "Sunshine h" into two lines.
266
+ - Highlight keeps a value's own colours: Colour scale while it is checked changes nothing (it
267
+ replaced a view's own colours by the theme's), and None or Data bars and back bring the value's
268
+ colours of an earlier step of the history back.
269
+ - The "i" popover (and every other popover) appears at its final size and place
270
+ ([#91](https://github.com/eizedev/pivotkit/issues/91)). Where the area of fixed elements ends before
271
+ the window's edge (a classic scroll bar, as on Windows; a transformed host element), it narrowed a
272
+ little on every placement, over about a second; it now takes its own width (`width: max-content`,
273
+ capped as before) and is placed inside the window without its scroll bars.
274
+ - With reduced motion a chip's menu (and every other menu) takes the focus when it opens
275
+ ([#78](https://github.com/eizedev/pivotkit/issues/78)). The reduced-motion rule gave every element a
276
+ transition of 1 ms, also those without one of their own (`transition-property` is `all` by
277
+ default), so a popover shown from `visibility: hidden` was still hidden in the frame its focus
278
+ moved; reduced motion now turns animations and transitions off (`animation: none`,
279
+ `transition: none`), so nothing moves at all.
280
+ - German texts quote with German quotation marks
281
+ ([#79](https://github.com/eizedev/pivotkit/issues/79)): a text condition in a chip's menu
282
+ ("enthält „an“") and the fields a view for other data names ("Felder, die diese Daten
283
+ nicht haben: „Country“") take their quotes from the new label `quote` (`"“{text}”"` in English,
284
+ `"„{text}“"` in German); they were English quotes in every language.
285
+ - The empty report's first steps ("Build your report in three steps" with its **Start with …**
286
+ buttons) are no longer cut off in a report lower than they are (a host's height, the result's least
287
+ height of 240 px): the result's area scrolls what is taller than it (`.pk-result` is
288
+ `overflow: auto`); the table keeps scrolling in its own box.
289
+
9
290
  ## [0.2.0] - 2026-11-08
10
291
 
11
292
  ### Added
@@ -437,6 +718,8 @@ First release.
437
718
  weather (Open-Meteo), countries (World Bank), earthquakes (USGS), Nobel laureates and the release
438
719
  cycles of software products (endoflife.date).
439
720
 
440
- [Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.2.0...HEAD
721
+ [Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.4.0...HEAD
722
+ [0.4.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.3.0...pivotkit-react@0.4.0
723
+ [0.3.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.2.0...pivotkit-react@0.3.0
441
724
  [0.2.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-react@0.1.0...pivotkit-react@0.2.0
442
725
  [0.1.0]: https://github.com/eizedev/pivotkit/releases/tag/pivotkit-react@0.1.0
package/README.md CHANGED
@@ -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.2.0` is 0.2.x): an app that also imports pivotkit-core itself must use a version
29
+ versions only (`^0.4.0` is 0.4.x): 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
@@ -68,8 +68,15 @@ var en = {
68
68
  chartTypes: { auto: "Automatic", bar: "Bars", stacked: "Stacked bars", horizontal: "Horizontal bars", line: "Lines", area: "Area", pie: "Pie", donut: "Donut", heatmap: "Heatmap" },
69
69
  undo: "Undo",
70
70
  redo: "Redo",
71
+ // Start over: the toolbar's menu of Reset and New (or their entries in More), each with what it
72
+ // does and, while it does nothing, why
73
+ startOver: "Start over",
71
74
  reset: "Reset",
72
- resetHint: "Back to the start view",
75
+ resetHint: "Back to the start view. Your data stays.",
76
+ resetAlready: "Already at the start view.",
77
+ resetStartEmpty: "The start view is empty: use New, empty report.",
78
+ newHint: "No fields. Undo brings it back. Your data stays.",
79
+ newAlready: "The report is empty already.",
73
80
  // next to Views: the name of the view loaded, and the mark while it has changes not saved
74
81
  unsavedChanges: "Unsaved changes",
75
82
  swap: "Swap rows and columns",
@@ -80,6 +87,13 @@ var en = {
80
87
  more: "More",
81
88
  // the Views menu: the saved views (the host's templates) and sharing
82
89
  views: "Views",
90
+ // loading data (allowImport): the Data button, its dot while a file's data is shown, the empty report
91
+ data: "Data",
92
+ dataLoaded: "Data from a file",
93
+ loadData: "Load data\u2026",
94
+ emptyLoad: "Or load your own data: drop a file onto the report, or",
95
+ emptyDrop: "Drop a file onto the report, or",
96
+ emptyNoData: "Load data to start",
83
97
  exportLabel: "Export",
84
98
  options: "Options",
85
99
  expand: "Expand {label}",
@@ -133,6 +147,8 @@ var en = {
133
147
  filter: "Filter\u2026",
134
148
  filtered: "Filtered",
135
149
  filterSummary: "{shown} of {total}",
150
+ /** a text the user typed or a name, quoted as the language quotes: a text condition, field names */
151
+ quote: "\u201C{text}\u201D",
136
152
  filterTitle: "Filter {field}",
137
153
  // the condition on the labels of a field: text, or a number's label
138
154
  condition: "Text condition",
@@ -184,7 +200,7 @@ var en = {
184
200
  toastUndone: "Undone: {step}",
185
201
  toastRedone: "Redone: {step}",
186
202
  toastReset: "Back to the start view",
187
- // New's step said in the status line, and its entry in the Views menu
203
+ // New's entry under Start over, and its step said in the status line
188
204
  newEmpty: "New, empty report",
189
205
  toastLoaded: "View \u201C{name}\u201D loaded",
190
206
  toastExportFailed: "Export failed: {message}",
@@ -307,6 +323,18 @@ var en = {
307
323
  },
308
324
  // filters
309
325
  valueConditions: { compare: "{value} {op} {number}", between: "{value} between {from} and {to}", notBetween: "{value} not between {from} and {to}" },
326
+ // the measure a sort or a filter goes by when the view shows no value: the rows counted
327
+ countOfRows: "Count of rows",
328
+ // a rule on the names of a field's items, on its chip and in its menu: "contains “an”"
329
+ labelOps: { equals: "is", notEquals: "is not", contains: "contains", notContains: "does not contain", beginsWith: "begins with", endsWith: "ends with" },
330
+ // a relative date range and a date compared, in short (the chip and the Filter level): "last 5 years (2022–2026)", "from 2022"
331
+ relative: { year: "this year", years: "last {count} years", month: "last {count} month", months: "last {count} months", day: "last {count} day", days: "last {count} days" },
332
+ withRange: "{text} ({range})",
333
+ // the range counted back from the data's latest record, and the data's share of a range
334
+ relativeTo: "{text} to {end}",
335
+ withShare: "{text} ({range}; {missing})",
336
+ noData: { one: "{range} has no data", other: "{range} have no data" },
337
+ compareShort: { "=": "{value}", "!=": "not {value}", ">": "after {value}", ">=": "from {value}", "<": "before {value}", "<=": "up to {value}", between: "{from} to {to}", notBetween: "not {from} to {to}" },
310
338
  // the i next to each zone's title (shown while explanations are on)
311
339
  zoneInfo: {
312
340
  rows: "Rows group the report by a field: each of its items gets a row. Example: Region in Rows lists North, South and West one below the other.",
@@ -401,8 +429,13 @@ var de = {
401
429
  chartTypes: { auto: "Automatisch", bar: "Balken", stacked: "Gestapelte Balken", horizontal: "Liegende Balken", line: "Linien", area: "Fl\xE4che", pie: "Kreis", donut: "Ring", heatmap: "Heatmap" },
402
430
  undo: "R\xFCckg\xE4ngig",
403
431
  redo: "Wiederholen",
432
+ startOver: "Neu beginnen",
404
433
  reset: "Zur\xFCcksetzen",
405
- resetHint: "Zur\xFCck zur Startansicht",
434
+ resetHint: "Zur\xFCck zur Startansicht. Deine Daten bleiben.",
435
+ resetAlready: "Schon in der Startansicht.",
436
+ resetStartEmpty: "Die Startansicht ist leer: Nimm \u201ENeuer, leerer Bericht\u201C.",
437
+ newHint: "Keine Felder. R\xFCckg\xE4ngig bringt den Bericht zur\xFCck. Deine Daten bleiben.",
438
+ newAlready: "Der Bericht ist schon leer.",
406
439
  unsavedChanges: "Nicht gespeicherte \xC4nderungen",
407
440
  swap: "Zeilen und Spalten tauschen",
408
441
  layout: "Anordnung",
@@ -410,6 +443,12 @@ var de = {
410
443
  layoutEmpty: "Noch keine Felder angeordnet",
411
444
  more: "Mehr",
412
445
  views: "Ansichten",
446
+ data: "Daten",
447
+ dataLoaded: "Daten aus einer Datei",
448
+ loadData: "Daten laden\u2026",
449
+ emptyLoad: "Oder eigene Daten laden: eine Datei auf den Bericht ziehen, oder",
450
+ emptyDrop: "Eine Datei auf den Bericht ziehen, oder",
451
+ emptyNoData: "Daten laden, um zu beginnen",
413
452
  exportLabel: "Export",
414
453
  options: "Optionen",
415
454
  expand: "{label} aufklappen",
@@ -461,6 +500,7 @@ var de = {
461
500
  filter: "Filtern\u2026",
462
501
  filtered: "Gefiltert",
463
502
  filterSummary: "{shown} von {total}",
503
+ quote: "\u201E{text}\u201C",
464
504
  filterTitle: "{field} filtern",
465
505
  condition: "Textbedingung",
466
506
  emptyTitle: "Den Bericht in drei Schritten bauen",
@@ -613,6 +653,14 @@ var de = {
613
653
  file: "Die Datei konnte nicht gelesen werden."
614
654
  },
615
655
  valueConditions: { compare: "{value} {op} {number}", between: "{value} zwischen {from} und {to}", notBetween: "{value} nicht zwischen {from} und {to}" },
656
+ countOfRows: "Anzahl der Zeilen",
657
+ labelOps: { equals: "ist", notEquals: "ist nicht", contains: "enth\xE4lt", notContains: "enth\xE4lt nicht", beginsWith: "beginnt mit", endsWith: "endet mit" },
658
+ relative: { year: "dieses Jahr", years: "letzte {count} Jahre", month: "letzter {count} Monat", months: "letzte {count} Monate", day: "letzter {count} Tag", days: "letzte {count} Tage" },
659
+ withRange: "{text} ({range})",
660
+ relativeTo: "{text} bis {end}",
661
+ withShare: "{text} ({range}; {missing})",
662
+ noData: { one: "{range} hat keine Daten", other: "{range} haben keine Daten" },
663
+ compareShort: { "=": "{value}", "!=": "nicht {value}", ">": "nach {value}", ">=": "ab {value}", "<": "vor {value}", "<=": "bis {value}", between: "{from} bis {to}", notBetween: "nicht {from} bis {to}" },
616
664
  zoneInfo: {
617
665
  rows: "Zeilen gruppieren den Bericht nach einem Feld: Jeder Eintrag bekommt eine Zeile. Beispiel: Region in Zeilen listet Nord, S\xFCd und West untereinander.",
618
666
  cols: "Spalten teilen jede Zeile nach einem Feld: Jeder Eintrag bekommt eine Spalte. Beispiel: Jahr in Spalten stellt 2024 und 2025 nebeneinander.",
@@ -82,6 +82,12 @@ var en = {
82
82
  filterCount: "Top needs a whole number from 1 to {max} - this filter is left out",
83
83
  filterValue: "the condition needs a comparison and a number - this filter is left out",
84
84
  filterValue2: "\u201C{value}\u201D needs a second number - this filter is left out",
85
+ filterCompareField: "only numbers and dates can be compared - this filter is left out",
86
+ filterCompareValue: "the comparison needs an operator and a number or a date (2022-03-01) that fits the field - this filter is left out",
87
+ filterRelativeField: "a range like \u201Clast 5 years\u201D needs a date field - this filter is left out",
88
+ filterRelativeUnit: "the unit \u201C{value}\u201D is unknown (years, months or days) - this filter is left out",
89
+ filterRelativeCount: "the range needs a whole number from 1 to {max} - this filter is left out",
90
+ filterRelativeAnchor: "the range can count back from \u201Ctoday\u201D or from \u201Clatest\u201D (the latest record), not from \u201C{value}\u201D - this filter is left out",
85
91
  sortNoItems: "the custom order lists no items - the usual order is used",
86
92
  sortedTwice: "the field is sorted twice - only its first sort is used",
87
93
  badTotals: "the totals cannot be read - the usual totals are shown",