pivotkit-react 0.2.0 → 0.3.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 (39) hide show
  1. package/CHANGELOG.md +164 -1
  2. package/README.md +1 -1
  3. package/dist/chunks/{chunk-F6MVUAQD.js → chunk-32Z33U6S.js} +23 -0
  4. package/dist/chunks/{chunk-QBD4FOBB.js → chunk-7CC4JHDY.js} +123 -14
  5. package/dist/chunks/{chunk-LQCWFJBS.js → chunk-APB4NW4O.js} +146 -22
  6. package/dist/chunks/{chunk-53ZMK4BH.js → chunk-EM23V5GH.js} +6 -0
  7. package/dist/chunks/{chunk-X7H7BAVT.js → chunk-IOPAM4JD.js} +307 -179
  8. package/dist/chunks/{chunk-OYY4BKIL.js → chunk-RWYHJRQO.js} +6 -0
  9. package/dist/chunks/{unused-texts-YTNJCFFC.js → unused-texts-K3VFH65P.js} +1 -1
  10. package/dist/chunks/{unused-texts-de-SGOHV4N7.js → unused-texts-de-OW4TGIVX.js} +1 -1
  11. package/dist/index.js +58 -56
  12. package/dist/labels.js +5 -5
  13. package/dist/menu-texts-de.js +1 -1
  14. package/dist/menus.js +2429 -670
  15. package/dist/styles.css +557 -117
  16. package/package.json +2 -2
  17. package/types/chip-menus.d.ts +20 -4
  18. package/types/dnd.d.ts +8 -4
  19. package/types/filter-level.d.ts +16 -0
  20. package/types/filter.d.ts +31 -0
  21. package/types/help.d.ts +0 -7
  22. package/types/labels.d.ts +71 -0
  23. package/types/lazy-menus.d.ts +2 -2
  24. package/types/levels.d.ts +105 -0
  25. package/types/menu-fields.d.ts +80 -0
  26. package/types/menu-labels.d.ts +214 -19
  27. package/types/menu-ops.d.ts +150 -9
  28. package/types/menu-topics.d.ts +293 -0
  29. package/types/menus.d.ts +1 -1
  30. package/types/names.d.ts +141 -1
  31. package/types/place.d.ts +44 -0
  32. package/types/section.d.ts +8 -11
  33. package/types/tips.d.ts +1 -36
  34. package/types/toolbar-panels.d.ts +15 -8
  35. package/types/unused-texts.d.ts +6 -0
  36. package/types/use-view-history.d.ts +2 -1
  37. package/types/view-ops.d.ts +12 -0
  38. package/types/zones.d.ts +5 -4
  39. package/types/sections.d.ts +0 -2
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import {
23
23
  chartPlan,
24
24
  chartTypeOf,
25
25
  cleanDismissed,
26
+ dateSpan,
26
27
  drillRows,
27
28
  fieldAction,
28
29
  fieldsCollapsed,
@@ -34,6 +35,7 @@ import {
34
35
  headerSortTarget,
35
36
  helpSwitch,
36
37
  isEmptyView,
38
+ itemRuleText,
37
39
  keptOnReset,
38
40
  layoutSummary,
39
41
  linkNow,
@@ -53,7 +55,6 @@ import {
53
55
  removeAt,
54
56
  rootOf,
55
57
  rowFolding,
56
- sectionOpen,
57
58
  selectedItems,
58
59
  setChart,
59
60
  setChartDisplay,
@@ -78,13 +79,12 @@ import {
78
79
  valueLabel,
79
80
  viewFromObject,
80
81
  withHostOrders,
81
- withSection,
82
82
  withoutFilters,
83
83
  writeDismissed,
84
84
  writeItem,
85
85
  writeStoredView,
86
86
  zoneOverLimit
87
- } from "./chunks/chunk-X7H7BAVT.js";
87
+ } from "./chunks/chunk-IOPAM4JD.js";
88
88
  import {
89
89
  LABELS,
90
90
  MENU_TEXTS,
@@ -94,7 +94,7 @@ import {
94
94
  messageOf,
95
95
  plural,
96
96
  resolveLabels
97
- } from "./chunks/chunk-F6MVUAQD.js";
97
+ } from "./chunks/chunk-32Z33U6S.js";
98
98
 
99
99
  // src/PivotReport.jsx
100
100
  import React12, { useCallback as useCallback9, useEffect as useEffect11, useId as useId4, useMemo as useMemo8, useRef as useRef11, useState as useState12, useSyncExternalStore as useSyncExternalStore3 } from "react";
@@ -440,9 +440,18 @@ function PivotDnd({ labels, onDrop, onDragStart, renderOverlay, children }) {
440
440
  /* @__PURE__ */ React2.createElement(DragOverlay, { dropAnimation: reduced ? null : { duration: 160, easing: "cubic-bezier(.2,.8,.2,1)" }, zIndex: 1e3 }, active ? renderOverlay(active) : null)
441
441
  );
442
442
  }
443
+ function ownEventsOnly(listener) {
444
+ return (event) => {
445
+ if (event.currentTarget instanceof Node && event.target instanceof Node && !event.currentTarget.contains(event.target)) {
446
+ return;
447
+ }
448
+ listener(event);
449
+ };
450
+ }
443
451
  function split(listeners2) {
444
- const { onKeyDown, ...pointer } = listeners2 ?? {};
445
- return { pointer, keyboard: onKeyDown ? { onKeyDown } : {} };
452
+ const own2 = Object.fromEntries(Object.entries(listeners2 ?? {}).map(([name, listener]) => [name, ownEventsOnly(listener)]));
453
+ const { onKeyDown, ...pointer } = own2;
454
+ return { pointer, keyboard: listeners2?.onKeyDown ? { onKeyDown } : {} };
446
455
  }
447
456
  function useDragSource(id, source, disabled = false) {
448
457
  const { setNodeRef, setActivatorNodeRef, attributes, listeners: listeners2, isDragging } = useDraggable({ id, data: source, disabled });
@@ -1443,7 +1452,7 @@ import React9, { useEffect as useEffect7, useMemo as useMemo4, useRef as useRef7
1443
1452
  import { fieldLabel as fieldLabel3 } from "pivotkit-core";
1444
1453
 
1445
1454
  // src/unused-load.js
1446
- var UNUSED_TEXTS_OF = Object.freeze({ de: () => import("./chunks/unused-texts-de-SGOHV4N7.js").then((m) => m.de) });
1455
+ var UNUSED_TEXTS_OF = Object.freeze({ de: () => import("./chunks/unused-texts-de-OW4TGIVX.js").then((m) => m.de) });
1447
1456
  var pending2 = /* @__PURE__ */ new Map();
1448
1457
  var loaded2 = /* @__PURE__ */ new Map();
1449
1458
  var unusedNow = (lang) => loaded2.get(lang) ?? null;
@@ -1451,7 +1460,7 @@ function loadUnused(lang) {
1451
1460
  let p = pending2.get(lang);
1452
1461
  if (!p) {
1453
1462
  const own2 = Object.hasOwn(UNUSED_TEXTS_OF, lang) ? UNUSED_TEXTS_OF[lang]().catch(() => null) : null;
1454
- p = Promise.all([import("./chunks/unused-texts-YTNJCFFC.js"), own2]).then(
1463
+ p = Promise.all([import("./chunks/unused-texts-K3VFH65P.js"), own2]).then(
1455
1464
  ([mod, texts]) => {
1456
1465
  const out = { mod, lang: texts };
1457
1466
  loaded2.set(lang, out);
@@ -2025,12 +2034,13 @@ function useViewHistory({ encoded, view, defaultView, onViewChange, limits, outs
2025
2034
  [live, apply]
2026
2035
  );
2027
2036
  const restore = useCallback6((next, tag = null) => apply(createState(schema, start, json(next), tag)), [schema, start, json, apply]);
2037
+ const earlier = useCallback6(() => live.past.map((p) => JSON.parse(p.view)), [live.past]);
2028
2038
  const canUndo = live.past.length > 0;
2029
2039
  const canRedo = live.future.length > 0;
2030
2040
  const canReset = live.present !== live.start;
2031
2041
  return useMemo6(
2032
- () => ({ view: current, viewKey: shown, tag: live.tag, setTag, commit, undo: undo2, redo: redo2, reset: reset2, restore, keyOf: json, canUndo, canRedo, canReset }),
2033
- [current, shown, live.tag, setTag, commit, undo2, redo2, reset2, restore, json, canUndo, canRedo, canReset]
2042
+ () => ({ view: current, viewKey: shown, tag: live.tag, setTag, commit, undo: undo2, redo: redo2, reset: reset2, restore, keyOf: json, earlier, canUndo, canRedo, canReset }),
2043
+ [current, shown, live.tag, setTag, commit, undo2, redo2, reset2, restore, json, earlier, canUndo, canRedo, canReset]
2034
2044
  );
2035
2045
  }
2036
2046
 
@@ -2122,20 +2132,22 @@ function measureFit(el, m, fit) {
2122
2132
  // src/zones.jsx
2123
2133
  import React11, { useCallback as useCallback8, useEffect as useEffect10, useMemo as useMemo7, useRef as useRef10, useState as useState11 } from "react";
2124
2134
  import { fieldItems, fieldLabel as fieldLabel4 } from "pivotkit-core";
2125
- function fieldState(view, field, encoded, locale) {
2135
+ function fieldState(view, field, encoded, locale, labels, sourceType) {
2126
2136
  const items = filtersOf(view, field, ["include", "exclude"]).filter((f) => f.type === "include" || f.items.length > 0);
2137
+ const compared = filtersOf(view, field, ["compare"]);
2138
+ const info = items.length || compared.length ? fieldItems(encoded, field, { view, locale }) : null;
2127
2139
  let summary = null;
2128
- if (items.length) {
2129
- const info = fieldItems(encoded, field, { view, locale });
2130
- if (info) {
2131
- const all = info.items.map((i) => i.value);
2132
- summary = { shown: selectedItems(view, field, all).length, total: all.length };
2133
- }
2134
- }
2140
+ if (items.length && info) {
2141
+ const all = info.items.map((i) => i.value);
2142
+ summary = { shown: selectedItems(view, field, all).length, total: all.length };
2143
+ }
2144
+ const labelOf = (v) => info?.items.find((i) => i.value === v)?.label;
2145
+ const date = sourceType === "date";
2146
+ const span = date ? dateSpan(encoded, sourceOf(view, field)) : null;
2147
+ const rules = filtersOf(view, field, ["relative", "compare", "label"]).map((f) => itemRuleText(f, labels, locale, { timeZone: encoded.timeZone, date, labelOf, span }));
2135
2148
  const top = filtersOf(view, field, ["top"])[0] ?? null;
2136
2149
  const condition = filtersOf(view, field, ["value"])[0] ?? null;
2137
- const other = filtersOf(view, field, ["label"]).length > 0;
2138
- return { summary, top, condition, other, sort: sortOf(view, field) };
2150
+ return { summary, rules, top, condition, sort: sortOf(view, field) };
2139
2151
  }
2140
2152
  function stateWords(state, view, labels, locale) {
2141
2153
  if (!state) {
@@ -2144,9 +2156,8 @@ function stateWords(state, view, labels, locale) {
2144
2156
  const words = [];
2145
2157
  if (state.summary) {
2146
2158
  words.push(`${labels.stateFiltered} ${fill(labels.filterSummary, { shown: state.summary.shown.toLocaleString(locale), total: state.summary.total.toLocaleString(locale) })}`);
2147
- } else if (state.other) {
2148
- words.push(labels.stateFiltered);
2149
2159
  }
2160
+ words.push(...state.rules);
2150
2161
  if (state.top) {
2151
2162
  words.push(fill(state.top.bottom ? labels.bottomBadge : labels.topBadge, { count: state.top.count.toLocaleString(locale) }));
2152
2163
  }
@@ -2163,62 +2174,56 @@ function Badges({ state, view, labels, locale }) {
2163
2174
  if (state.summary) {
2164
2175
  const text = fill(labels.filterSummary, { shown: state.summary.shown.toLocaleString(locale), total: state.summary.total.toLocaleString(locale) });
2165
2176
  parts.push(
2166
- /* @__PURE__ */ React11.createElement("span", { key: "filter", className: "pk-chip-badge pk-badge-text" }, /* @__PURE__ */ React11.createElement(Icon, { name: "filter", size: 12 }), text)
2177
+ /* @__PURE__ */ React11.createElement("span", { key: "filter", className: "pk-chip-badge pk-badge-text", "aria-hidden": "true" }, /* @__PURE__ */ React11.createElement(Icon, { name: "filter", size: 12 }), text)
2178
+ );
2179
+ }
2180
+ if (state.rules.length) {
2181
+ const more = state.rules.length - 1;
2182
+ parts.push(
2183
+ /* @__PURE__ */ React11.createElement("span", { key: "rules", className: "pk-chip-badge pk-badge-text pk-badge-condition", "data-testid": "rule-badge", "aria-hidden": "true" }, state.summary ? null : /* @__PURE__ */ React11.createElement(Icon, { name: "filter", size: 12 }), /* @__PURE__ */ React11.createElement("span", { className: "pk-badge-cut" }, state.rules[0]), more ? /* @__PURE__ */ React11.createElement("span", null, ` +${more.toLocaleString(locale)}`) : null)
2167
2184
  );
2168
- } else if (state.other) {
2169
- parts.push(/* @__PURE__ */ React11.createElement(Icon, { key: "filter", name: "filter", size: 12, className: "pk-chip-badge" }));
2170
2185
  }
2171
2186
  if (state.top) {
2172
2187
  const text = fill(state.top.bottom ? labels.bottomBadge : labels.topBadge, { count: state.top.count.toLocaleString(locale) });
2173
2188
  parts.push(
2174
- /* @__PURE__ */ React11.createElement("span", { key: "top", className: "pk-chip-badge pk-badge-text", "data-testid": "top-badge" }, /* @__PURE__ */ React11.createElement(Icon, { name: "top", size: 12 }), text)
2189
+ /* @__PURE__ */ React11.createElement("span", { key: "top", className: "pk-chip-badge pk-badge-text", "data-testid": "top-badge", "aria-hidden": "true" }, /* @__PURE__ */ React11.createElement(Icon, { name: "top", size: 12 }), text)
2175
2190
  );
2176
2191
  }
2177
2192
  if (state.condition) {
2178
2193
  const text = valueConditionText(view, state.condition, labels, locale);
2179
2194
  parts.push(
2180
- /* @__PURE__ */ React11.createElement("span", { key: "condition", className: "pk-chip-badge pk-badge-text pk-badge-condition", "data-testid": "condition-badge", title: text }, /* @__PURE__ */ React11.createElement(Icon, { name: "filter", size: 12 }), /* @__PURE__ */ React11.createElement("span", { className: "pk-badge-cut" }, text))
2195
+ /* @__PURE__ */ React11.createElement("span", { key: "condition", className: "pk-chip-badge pk-badge-text pk-badge-condition", "data-testid": "condition-badge", "aria-hidden": "true" }, /* @__PURE__ */ React11.createElement(Icon, { name: "filter", size: 12 }), /* @__PURE__ */ React11.createElement("span", { className: "pk-badge-cut" }, text))
2181
2196
  );
2182
2197
  }
2183
2198
  if (state.sort) {
2184
2199
  const desc = state.sort.order === "desc";
2185
2200
  parts.push(/* @__PURE__ */ React11.createElement(Icon, { key: "sort", name: desc ? "sortDesc" : "sortAsc", size: 12, className: "pk-chip-badge" }));
2186
2201
  }
2187
- if (!parts.length) {
2188
- return null;
2189
- }
2190
- return /* @__PURE__ */ React11.createElement("span", { className: "pk-badges-inline", "aria-hidden": "true" }, parts);
2202
+ return parts.length ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, parts) : null;
2191
2203
  }
2192
- function Chip({ id, zone, index, count, field, text, typeName, view, types, labels, commit, openFilter, onRemove, state, locale, defaultsOf, rangeOf, info, showInfo }) {
2204
+ function Chip({ id, zone, index, count, field, text, typeName, view, types, labels, commit, onRemove, state, locale, defaultsOf, earlier, rangeOf, info, showInfo, encoded }) {
2193
2205
  const { setNodeRef, isDragging, style, itemProps, handleProps } = useChip(id, { kind: "chip", zone, index, count, field, label: text, type: typeName });
2194
- const chipRef = useRef10(
2195
- /** @type {HTMLElement | null} */
2196
- null
2197
- );
2198
- const ref = (el) => {
2199
- chipRef.current = el;
2200
- setNodeRef(el);
2201
- };
2202
2206
  const badges = state ? /* @__PURE__ */ React11.createElement(Badges, { state, view, labels, locale }) : null;
2203
2207
  const words = stateWords(state, view, labels, locale);
2204
2208
  const name = words ? `${text}, ${words}` : void 0;
2205
2209
  const remove = () => onRemove(zone, index, text);
2206
- return /* @__PURE__ */ React11.createElement("li", { ref, style, className: `pk-chip pk-chip-${zone}${isDragging ? " pk-dragging" : ""}`, ...itemProps, "data-chip": text }, /* @__PURE__ */ React11.createElement("span", { className: "pk-handle", ...handleProps, "aria-label": fill(labels.dragHandle, { field: text }) }, /* @__PURE__ */ React11.createElement(Icon, { name: "grip", size: 16 })), /* @__PURE__ */ React11.createElement("span", { className: `pk-type pk-type-${typeName}`, "aria-hidden": "true" }, /* @__PURE__ */ React11.createElement(Icon, { name: (
2210
+ return /* @__PURE__ */ React11.createElement("li", { ref: setNodeRef, style, className: `pk-chip pk-chip-${zone}${isDragging ? " pk-dragging" : ""}`, ...itemProps, "data-chip": text }, /* @__PURE__ */ React11.createElement("span", { className: "pk-handle", ...handleProps, "aria-label": fill(labels.dragHandle, { field: text }) }, /* @__PURE__ */ React11.createElement(Icon, { name: "grip", size: 16 })), /* @__PURE__ */ React11.createElement("span", { className: `pk-type pk-type-${typeName}`, "aria-hidden": "true" }, /* @__PURE__ */ React11.createElement(Icon, { name: (
2207
2211
  /** @type {any} */
2208
2212
  TYPE_ICON[typeName] ?? "text"
2209
- ), size: 13 })), zone === "filters" ? /* @__PURE__ */ React11.createElement("button", { type: "button", className: "pk-chip-label", onClick: (e) => openFilter(field, e.currentTarget.closest(".pk-chip")), title: fill(labels.filterTitle, { field: text }), "aria-label": name }, /* @__PURE__ */ React11.createElement("span", { className: "pk-btn-text" }, /* @__PURE__ */ React11.createElement("span", { className: "pk-chip-name" }, text), badges)) : /* @__PURE__ */ React11.createElement(
2213
+ ), size: 13 })), /* @__PURE__ */ React11.createElement(
2210
2214
  MenuButton,
2211
2215
  {
2212
2216
  label: fill(labels.fieldMenu, { field: text }),
2213
2217
  text: /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("span", { className: "pk-chip-name" }, text), badges),
2214
2218
  className: "pk-chip-label",
2215
2219
  name,
2220
+ title: name ?? text,
2216
2221
  role: "dialog",
2217
2222
  popoverClass: "pk-chip-menu",
2218
2223
  fill: true,
2219
2224
  testId: `chip-menu-${text}`
2220
2225
  },
2221
- (close) => zone === "values" ? /* @__PURE__ */ React11.createElement(MenuPanel, { name: "ValueMenu", loadingText: labels.loadingMenu, props: { view, index, types, labels, commit, close, onRemove: remove, defaultsOf, info } }) : /* @__PURE__ */ React11.createElement(MenuPanel, { name: "AxisMenu", loadingText: labels.loadingMenu, props: { view, zone, index, field, types, labels, commit, close, openFilter, chipRef, onRemove: remove, defaultsOf, rangeOf, locale, info, state } })
2226
+ (close) => zone === "values" ? /* @__PURE__ */ React11.createElement(MenuPanel, { name: "ValueMenu", loadingText: labels.loadingMenu, props: { view, index, types, labels, commit, close, onRemove: remove, defaultsOf, info, locale, earlier } }) : zone === "filters" ? /* @__PURE__ */ React11.createElement(MenuPanel, { name: "FilterMenu", loadingText: labels.loadingMenu, props: { view, index, field, types, labels, commit, close, onRemove: remove, locale, info, state, encoded } }) : /* @__PURE__ */ React11.createElement(MenuPanel, { name: "AxisMenu", loadingText: labels.loadingMenu, props: { view, zone, index, field, types, labels, commit, close, onRemove: remove, defaultsOf, rangeOf, locale, info, state, encoded } })
2222
2227
  ), info && showInfo ? /* @__PURE__ */ React11.createElement(InfoButton, { info, name: fieldLabel4(sourceOf(view, field), labels.core), labels, className: "pk-chip-info" }) : null, /* @__PURE__ */ React11.createElement("button", { type: "button", className: "pk-chip-x", onClick: remove, "aria-label": fill(labels.removeField, { field: text }), title: fill(labels.removeField, { field: text }) }, /* @__PURE__ */ React11.createElement(Icon, { name: "x", size: 14 })));
2223
2228
  }
2224
2229
  function Zone({ zone, entries, labels, children, action, explain }) {
@@ -2267,7 +2272,7 @@ function ZoneSummary({ entries, labels, id, onShow, buttonRef }) {
2267
2272
  const text = parts.length ? parts.map((p) => `${p.title}: ${p.fields}`).join(" \xB7 ") : labels.layoutEmpty;
2268
2273
  return /* @__PURE__ */ React11.createElement("button", { ref: buttonRef, type: "button", id, className: "pk-zones-summary", "aria-expanded": "false", "aria-label": `${labels.showLayout}: ${text}`, title: labels.showLayout, onClick: onShow, "data-testid": "layout-summary" }, /* @__PURE__ */ React11.createElement(Icon, { name: "chevronRight", size: 16 }), /* @__PURE__ */ React11.createElement("span", { className: "pk-zones-summary-text" }, parts.length ? parts.map((p, i) => /* @__PURE__ */ React11.createElement(React11.Fragment, { key: p.zone }, i ? /* @__PURE__ */ React11.createElement("span", { "aria-hidden": "true" }, " \xB7 ") : null, /* @__PURE__ */ React11.createElement("span", { className: "pk-zones-summary-zone" }, p.title, ":"), " ", p.fields)) : labels.layoutEmpty));
2269
2274
  }
2270
- function Zones({ view, types, labels, commit, openFilter, encoded, locale, onSwap, id, folded, onShow, defaultsOf, infoOf, explain = false, showInfo = true }) {
2275
+ function Zones({ view, types, labels, commit, earlier, encoded, locale, onSwap, id, folded, onShow, defaultsOf, infoOf, explain = false, showInfo = true }) {
2271
2276
  const entries = useMemo7(() => zoneEntries(view, types, labels), [view, types, labels]);
2272
2277
  const dragging = Boolean(useActiveDrag());
2273
2278
  const showing = useRef10(false);
@@ -2280,11 +2285,11 @@ function Zones({ view, types, labels, commit, openFilter, encoded, locale, onSwa
2280
2285
  const map = /* @__PURE__ */ new Map();
2281
2286
  for (const zone of ["filters", "cols", "rows"]) {
2282
2287
  for (const e of entries[zone]) {
2283
- map.set(e.field, fieldState(view, e.field, encoded, locale));
2288
+ map.set(e.field, fieldState(view, e.field, encoded, locale, labels, e.type));
2284
2289
  }
2285
2290
  }
2286
2291
  return map;
2287
- }, [entries, view, encoded, locale]);
2292
+ }, [entries, view, encoded, locale, labels]);
2288
2293
  const rangeOf = useCallback8((field) => numberRange(encoded, field), [encoded]);
2289
2294
  const root = useRef10(
2290
2295
  /** @type {HTMLDivElement | null} */
@@ -2383,14 +2388,15 @@ function Zones({ view, types, labels, commit, openFilter, encoded, locale, onSwa
2383
2388
  types,
2384
2389
  labels,
2385
2390
  commit,
2386
- openFilter,
2387
2391
  onRemove,
2388
2392
  state: zone === "values" ? null : states.get(e.field),
2389
2393
  locale,
2390
2394
  defaultsOf,
2395
+ earlier,
2391
2396
  rangeOf,
2392
2397
  info: e.field ? infoOf?.(e.field) : void 0,
2393
- showInfo
2398
+ showInfo,
2399
+ encoded
2394
2400
  }
2395
2401
  ))
2396
2402
  ))
@@ -3248,11 +3254,9 @@ function Report(props) {
3248
3254
  const help = useMemo8(
3249
3255
  () => ({
3250
3256
  explain: settingSwitch.on,
3251
- labels: helpLabels,
3252
- isOpen: (id) => sectionOpen(id, dismissed),
3253
- setOpen: (id, open) => changeDismissed(withSection(dismissed, id, open), null)
3257
+ labels: helpLabels
3254
3258
  }),
3255
- [settingSwitch.on, helpLabels, dismissed, changeDismissed]
3259
+ [settingSwitch.on, helpLabels]
3256
3260
  );
3257
3261
  const [fieldsSession, setFieldsSession] = useState12(
3258
3262
  /** @type {boolean | null} */
@@ -3402,9 +3406,7 @@ function Report(props) {
3402
3406
  canResetTips: dismissed.some((id) => !keptOnReset(id)),
3403
3407
  onResetTips: () => changeDismissed(dismissed.filter(keptOnReset), null),
3404
3408
  help: {
3405
- explanations: explainUser ? { on: !dismissed.includes(NO_EXPLANATIONS), set: (on) => toggle(NO_EXPLANATIONS, on) } : null,
3406
- // the list with the sections' states, for "Reset menu sections" (the menus do the rest)
3407
- sections: [dismissed, changeDismissed]
3409
+ explanations: explainUser ? { on: !dismissed.includes(NO_EXPLANATIONS), set: (on) => toggle(NO_EXPLANATIONS, on) } : null
3408
3410
  },
3409
3411
  viewsRequest
3410
3412
  }
@@ -3415,7 +3417,6 @@ function Report(props) {
3415
3417
  types,
3416
3418
  labels,
3417
3419
  commit,
3418
- openFilter: (field, anchor) => setFilterTarget({ field, anchor }),
3419
3420
  encoded,
3420
3421
  locale,
3421
3422
  onSwap: () => commit(swapAxes(view), { step: "swap" }),
@@ -3424,6 +3425,7 @@ function Report(props) {
3424
3425
  onShow: () => setFolded(false),
3425
3426
  defaultsOf,
3426
3427
  infoOf,
3428
+ earlier: history.earlier,
3427
3429
  explain: zoneSwitch.on,
3428
3430
  showInfo: fieldSwitch.on
3429
3431
  }
package/dist/labels.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  en
3
- } from "./chunks/chunk-LQCWFJBS.js";
3
+ } from "./chunks/chunk-APB4NW4O.js";
4
4
  import {
5
5
  LABELS
6
- } from "./chunks/chunk-F6MVUAQD.js";
6
+ } from "./chunks/chunk-32Z33U6S.js";
7
7
  import {
8
8
  de
9
- } from "./chunks/chunk-QBD4FOBB.js";
9
+ } from "./chunks/chunk-7CC4JHDY.js";
10
10
  import {
11
11
  de as de2
12
- } from "./chunks/chunk-OYY4BKIL.js";
12
+ } from "./chunks/chunk-RWYHJRQO.js";
13
13
  import {
14
14
  en as en2
15
- } from "./chunks/chunk-53ZMK4BH.js";
15
+ } from "./chunks/chunk-EM23V5GH.js";
16
16
 
17
17
  // src/all-labels.js
18
18
  var LABELS2 = Object.freeze({ en: { ...LABELS.en, ...en, unused: en2 }, de: { ...LABELS.de, ...de, unused: de2 } });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  de
3
- } from "./chunks/chunk-QBD4FOBB.js";
3
+ } from "./chunks/chunk-7CC4JHDY.js";
4
4
  export {
5
5
  de
6
6
  };