pivotkit-react 0.1.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 (61) hide show
  1. package/CHANGELOG.md +306 -1
  2. package/README.md +48 -298
  3. package/dist/chunks/{chunk-ILHFIV2P.js → chunk-32Z33U6S.js} +58 -78
  4. package/dist/chunks/chunk-7CC4JHDY.js +363 -0
  5. package/dist/chunks/chunk-APB4NW4O.js +434 -0
  6. package/dist/chunks/chunk-EM23V5GH.js +183 -0
  7. package/dist/chunks/{chunk-KKJO36W5.js → chunk-IOPAM4JD.js} +412 -365
  8. package/dist/chunks/chunk-RWYHJRQO.js +99 -0
  9. package/dist/chunks/unused-texts-K3VFH65P.js +10 -0
  10. package/dist/chunks/unused-texts-de-OW4TGIVX.js +6 -0
  11. package/dist/echarts.js +96 -11
  12. package/dist/index.js +654 -560
  13. package/dist/labels.js +13 -4
  14. package/dist/menu-texts-de.js +6 -0
  15. package/dist/menus.js +2905 -550
  16. package/dist/styles.css +738 -216
  17. package/package.json +2 -2
  18. package/types/chart-layout.d.ts +111 -0
  19. package/types/chart-types.d.ts +0 -91
  20. package/types/chip-menus.d.ts +20 -4
  21. package/types/dnd.d.ts +8 -4
  22. package/types/drill-panel.d.ts +5 -22
  23. package/types/drill-table.d.ts +71 -0
  24. package/types/drill.d.ts +0 -36
  25. package/types/filter-level.d.ts +16 -0
  26. package/types/filter.d.ts +31 -0
  27. package/types/help.d.ts +14 -0
  28. package/types/icons.d.ts +4 -0
  29. package/types/labels.d.ts +114 -101
  30. package/types/lazy-menus.d.ts +18 -6
  31. package/types/levels.d.ts +105 -0
  32. package/types/menu-fields.d.ts +80 -0
  33. package/types/menu-labels-de.d.ts +2 -0
  34. package/types/menu-labels.d.ts +270 -13
  35. package/types/menu-ops.d.ts +286 -0
  36. package/types/menu-texts.d.ts +2 -0
  37. package/types/menu-topics.d.ts +293 -0
  38. package/types/menus.d.ts +2 -2
  39. package/types/names.d.ts +160 -20
  40. package/types/overflow.d.ts +4 -1
  41. package/types/place.d.ts +44 -0
  42. package/types/popover.d.ts +10 -6
  43. package/types/section.d.ts +8 -28
  44. package/types/share-actions.d.ts +99 -0
  45. package/types/share.d.ts +0 -9
  46. package/types/table.d.ts +9 -3
  47. package/types/templates.d.ts +7 -1
  48. package/types/tips.d.ts +1 -34
  49. package/types/toolbar-panels.d.ts +20 -10
  50. package/types/unused-load.d.ts +23 -0
  51. package/types/unused-texts-de.d.ts +2 -0
  52. package/types/unused-texts.d.ts +136 -0
  53. package/types/unused.d.ts +22 -0
  54. package/types/use-view-history.d.ts +8 -4
  55. package/types/view-history.d.ts +23 -6
  56. package/types/view-ops.d.ts +80 -119
  57. package/types/view-save.d.ts +76 -0
  58. package/types/view-store.d.ts +13 -6
  59. package/types/zones.d.ts +5 -4
  60. package/dist/chunks/chunk-C32TYSHG.js +0 -441
  61. package/dist/chunks/chunk-XYP47DJ3.js +0 -123
@@ -18,7 +18,221 @@ export declare const en: {
18
18
  groupLabels: string;
19
19
  labelPosition: string;
20
20
  sharedView: string;
21
+ newReport: string;
22
+ valuesFilter: string;
21
23
  };
24
+ back: string;
25
+ backTo: string;
26
+ levelTitle: string;
27
+ searchMenu: string;
28
+ searchMenuShort: string;
29
+ searchResults: string;
30
+ searchNothing: string;
31
+ sortByValue: string;
32
+ sortOldestShort: string;
33
+ sortNewestShort: string;
34
+ filterTopic: string;
35
+ filterAll: string;
36
+ groupTopic: string;
37
+ groupNoneShort: string;
38
+ off: string;
39
+ moveToTitle: string;
40
+ topOwn: string;
41
+ binsOff: string;
42
+ valueConditionTitle: string;
43
+ nameHint: string;
44
+ showAsKeywords: string;
45
+ nameKeywords: string;
46
+ filterKeywords: string;
47
+ formatDecimals: {
48
+ one: string;
49
+ other: string;
50
+ };
51
+ listAnd: string;
52
+ summaryAll: string;
53
+ summarySome: string;
54
+ summaryNone: string;
55
+ summaryOk: string;
56
+ summaryKept: string;
57
+ summaryQuickOnly: string;
58
+ summaryPicks: string;
59
+ summaryQuick: string;
60
+ summaryRules: {
61
+ one: string;
62
+ other: string;
63
+ };
64
+ summaryTotals: {
65
+ one: string;
66
+ other: string;
67
+ };
68
+ summaryRows: string;
69
+ summaryData: string;
70
+ yearsAll: string;
71
+ yearsOne: string;
72
+ emptyPicks: string;
73
+ emptyRules: string;
74
+ emptyTotal: string;
75
+ totalSpread: string;
76
+ totalWords: string;
77
+ totalWordsTwo: string;
78
+ resetFilter: string;
79
+ nouns: {
80
+ item: {
81
+ one: string;
82
+ other: string;
83
+ };
84
+ value: {
85
+ one: string;
86
+ other: string;
87
+ };
88
+ date: {
89
+ one: string;
90
+ other: string;
91
+ };
92
+ year: {
93
+ one: string;
94
+ other: string;
95
+ };
96
+ quarter: {
97
+ one: string;
98
+ other: string;
99
+ };
100
+ month: {
101
+ one: string;
102
+ other: string;
103
+ };
104
+ week: {
105
+ one: string;
106
+ other: string;
107
+ };
108
+ day: {
109
+ one: string;
110
+ other: string;
111
+ };
112
+ weekday: {
113
+ one: string;
114
+ other: string;
115
+ };
116
+ hour: {
117
+ one: string;
118
+ other: string;
119
+ };
120
+ range: {
121
+ one: string;
122
+ other: string;
123
+ };
124
+ };
125
+ quickTitle: string;
126
+ quickCount: {
127
+ year: string;
128
+ month: string;
129
+ day: string;
130
+ };
131
+ quickLast: {
132
+ year: {
133
+ one: string;
134
+ other: string;
135
+ };
136
+ month: {
137
+ one: string;
138
+ other: string;
139
+ };
140
+ day: {
141
+ one: string;
142
+ other: string;
143
+ };
144
+ };
145
+ quickRows: string;
146
+ quickHidden: {
147
+ one: string;
148
+ other: string;
149
+ };
150
+ anchorLabel: string;
151
+ anchorToday: string;
152
+ anchorLatest: string;
153
+ quickLine: string;
154
+ changeAbove: string;
155
+ yearsCombined: string;
156
+ yearsCombinedHint: string;
157
+ yearsCombinedOne: string;
158
+ pickItems: string;
159
+ picksState: string;
160
+ picksAll: string;
161
+ clear: string;
162
+ clearPicks: string;
163
+ rulesState: {
164
+ one: string;
165
+ other: string;
166
+ };
167
+ rulesNoneState: string;
168
+ removeAll: string;
169
+ removeRules: string;
170
+ tailOut: {
171
+ one: string;
172
+ other: string;
173
+ };
174
+ rulesKeep: string;
175
+ rulesNone: string;
176
+ ruleKeeps: string;
177
+ ruleKeepsNone: string;
178
+ ruleIncomplete: string;
179
+ explainRule: string;
180
+ ruleInfo: {
181
+ number: string;
182
+ date: string;
183
+ group: string;
184
+ cyclic: string;
185
+ total: string;
186
+ name: string;
187
+ };
188
+ scopeItems: string;
189
+ scopeDates: string;
190
+ scopeRows: string;
191
+ pickerSearch: string;
192
+ pickerMatch: string;
193
+ pickerNone: string;
194
+ rulesTitle: string;
195
+ ruleAnd: string;
196
+ addRule: string;
197
+ addRuleItem: string;
198
+ addRuleTotal: string;
199
+ addRuleName: string;
200
+ removeRule: string;
201
+ rulesFull: string;
202
+ ruleName: string;
203
+ ruleValue: string;
204
+ ruleDate: string;
205
+ dateOps: {
206
+ "=": string;
207
+ "!=": string;
208
+ ">": string;
209
+ ">=": string;
210
+ "<": string;
211
+ "<=": string;
212
+ between: string;
213
+ notBetween: string;
214
+ };
215
+ lastOp: {
216
+ one: string;
217
+ other: string;
218
+ };
219
+ ruleUnits: {
220
+ year: {
221
+ one: string;
222
+ other: string;
223
+ };
224
+ month: {
225
+ one: string;
226
+ other: string;
227
+ };
228
+ day: {
229
+ one: string;
230
+ other: string;
231
+ };
232
+ };
233
+ ruleWhose: string;
234
+ blanksOut: string;
235
+ ruleUnit: string;
22
236
  moveLeft: string;
23
237
  moveRight: string;
24
238
  remove: string;
@@ -26,6 +240,7 @@ export declare const en: {
26
240
  sharedViews: string;
27
241
  myViews: string;
28
242
  noViews: string;
243
+ noViewsStore: string;
29
244
  publishView: string;
30
245
  publishConfirm: string;
31
246
  publishAction: string;
@@ -48,6 +263,15 @@ export declare const en: {
48
263
  deleteAction: string;
49
264
  saveView: string;
50
265
  viewName: string;
266
+ thisView: string;
267
+ saveNamed: string;
268
+ saveAs: string;
269
+ saveSharedLocked: string;
270
+ saveNotInViews: string;
271
+ replaceConfirm: string;
272
+ replaceAction: string;
273
+ replaceSharedConfirm: string;
274
+ newAlready: string;
51
275
  save: string;
52
276
  cancel: string;
53
277
  expandAll: string;
@@ -91,7 +315,6 @@ export declare const en: {
91
315
  rename: string;
92
316
  sortOldest: string;
93
317
  sortNewest: string;
94
- groupBy: string;
95
318
  groupNone: string;
96
319
  groupTimeline: string;
97
320
  groupCyclic: string;
@@ -109,11 +332,11 @@ export declare const en: {
109
332
  bin: string;
110
333
  };
111
334
  bins: string;
335
+ binsState: string;
112
336
  binSize: string;
113
337
  binStart: string;
114
338
  binStartFar: string;
115
339
  apply: string;
116
- removeSetting: string;
117
340
  topN: string;
118
341
  topCount: string;
119
342
  bottom: string;
@@ -133,6 +356,7 @@ export declare const en: {
133
356
  exportCsv: string;
134
357
  exportPng: string;
135
358
  exportPngNeedsChart: string;
359
+ exportNeedsField: string;
136
360
  copyTable: string;
137
361
  copyDataJson: string;
138
362
  toastTableCopied: string;
@@ -156,6 +380,7 @@ export declare const en: {
156
380
  showTips: string;
157
381
  showSettingInfo: string;
158
382
  resetTips: string;
383
+ sectionChanged: string;
159
384
  help: string;
160
385
  shortcutsTitle: string;
161
386
  keys: {
@@ -167,6 +392,16 @@ export declare const en: {
167
392
  Escape: string;
168
393
  F10: string;
169
394
  };
395
+ shortcuts: {
396
+ undo: string;
397
+ redo: string;
398
+ move: string;
399
+ open: string;
400
+ drag: string;
401
+ close: string;
402
+ fields: string;
403
+ fieldMenu: string;
404
+ };
170
405
  valueLabels: string;
171
406
  valueLabelNames: {
172
407
  auto: string;
@@ -203,6 +438,7 @@ export declare const en: {
203
438
  off: string;
204
439
  };
205
440
  defaultName: string;
441
+ shareThisView: string;
206
442
  share: string;
207
443
  copyLink: string;
208
444
  copyJson: string;
@@ -219,8 +455,8 @@ export declare const en: {
219
455
  switchStartsFresh: string;
220
456
  numberInvalid: string;
221
457
  countInvalid: string;
458
+ countMax: string;
222
459
  sizeInvalid: string;
223
- valueFilter: string;
224
460
  valueFilterBy: string;
225
461
  valueFilterOp: string;
226
462
  valueFilterNumber: string;
@@ -235,20 +471,41 @@ export declare const en: {
235
471
  between: string;
236
472
  notBetween: string;
237
473
  };
238
- removeFilter: string;
239
- valuesFilterHint: string;
240
474
  moreFormats: string;
475
+ totals: string;
476
+ grandTotalRow: string;
477
+ grandTotalColumn: string;
478
+ rowSubtotals: string;
479
+ colSubtotals: string;
480
+ needsRowField: string;
481
+ needsColField: string;
482
+ needsRowFields: string;
483
+ needsColFields: string;
484
+ expandNothing: string;
485
+ collapseNeedsRows: string;
486
+ collapseAllDone: string;
487
+ groupsCollapsed: {
488
+ one: string;
489
+ other: string;
490
+ };
491
+ groupsExpanded: {
492
+ one: string;
493
+ other: string;
494
+ };
495
+ chartDisplay: string;
496
+ toastExported: string;
497
+ toastLinkCopied: string;
498
+ toastJsonCopied: string;
499
+ toastCopyFailed: string;
500
+ toastLinkTooLong: string;
241
501
  };
242
- /** @type {MenuTexts} */
243
- export declare const de: MenuTexts;
244
- /** @type {Readonly<{ en: MenuTexts, de: MenuTexts }>} */
245
- export declare const MENU_LABELS: Readonly<{
246
- en: MenuTexts;
247
- de: MenuTexts;
248
- }>;
502
+ /** Adds the menus' texts of a language, once its chunk has loaded. */
503
+ export declare function addMenuTexts(lang: any, texts: any): void;
504
+ /** Whether the menus' texts of a language are here. */
505
+ export declare const hasMenuTexts: (lang: any) => boolean;
249
506
  /**
250
507
  * The report's labels with the menus' texts of their language (English for a language of a host's
251
- * own), a host's own texts for them applied.
508
+ * own, or while that language's texts still load), a host's own texts for them applied.
252
509
  * @param {import("./labels.js").UiLabels} labels
253
510
  * @returns {import("./labels.js").UiLabels}
254
511
  */
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Changes properties of the value at `index` (agg, format, label, showAs, conditional). A new
3
+ * aggregator drops the "show values as" calculation (a running total does not fit an average) and
4
+ * picks the format: one the patch names; else the user's own format (one that is not the host's
5
+ * default) while the result keeps its unit (average to median: still years); else the host's format
6
+ * for the field (fieldDefaults) when its aggregator has that unit; else none, the automatic one.
7
+ * @param {any} view
8
+ * @param {number} index
9
+ * @param {{ agg?: string, format?: string | null, label?: string | null, showAs?: object | null, conditional?: object | null }} patch
10
+ * @param {{ defaults?: { agg?: string, format?: string } }} [options] `defaults`: the host's
11
+ * settings for the value's field
12
+ */
13
+ export declare function updateValue(view: any, index: number, patch: {
14
+ agg?: string;
15
+ format?: string | null;
16
+ label?: string | null;
17
+ showAs?: object | null;
18
+ conditional?: object | null;
19
+ }, options?: {
20
+ defaults?: {
21
+ agg?: string;
22
+ format?: string;
23
+ };
24
+ }): any;
25
+ /**
26
+ * Why ranges of `size` from `start` cannot hold the numbers of `range`, or null when they can. A start
27
+ * so far from the values that a range's bounds can no longer be told apart in a double (1e17 for
28
+ * magnitudes of 2 to 9 in ranges of 0.5) would put every row into "(blank)": "far".
29
+ * @param {number} size
30
+ * @param {number} start
31
+ * @param {{ min: number, max: number } | null} range
32
+ * @returns {"far" | null}
33
+ */
34
+ export declare function binProblem(size: number, start: number, range: {
35
+ min: number;
36
+ max: number;
37
+ } | null): "far" | null;
38
+ /**
39
+ * The item filter of a field from the selected values: everything selected removes it; otherwise the
40
+ * values not selected are excluded, so values that appear in newer data are shown, as in Excel.
41
+ * @param {any} view
42
+ * @param {string} field
43
+ * @param {Array<unknown>} selected values (null is blank)
44
+ * @param {Array<unknown>} all every value of the field
45
+ */
46
+ export declare function setItemFilter(view: any, field: string, selected: Array<unknown>, all: Array<unknown>): any;
47
+ /** The label condition of a field ({ op, value }) or null to remove it. */
48
+ export declare function setLabelFilter(view: any, field: any, condition: any): any;
49
+ /**
50
+ * Top or bottom N items of a field by a value ({ count, bottom, by }), or null to remove it. `previous`
51
+ * is the top filter being edited (the view's own entry); without it the field's top filters are
52
+ * replaced. Another top filter of the field (a view may hold two) stays.
53
+ */
54
+ export declare function setTopFilter(view: any, field: any, top: any, previous: any): any;
55
+ /**
56
+ * A value condition on a field ({ by, op, value, value2 }, pivotkit-core's `value` filter: "Sum of
57
+ * Revenue greater than 1000"), or null to remove it. `previous` is the condition being edited (the
58
+ * view's own entry): only that one is replaced or removed; without it every value condition of the
59
+ * field is. The field keeps its other filters.
60
+ * @param {any} view
61
+ * @param {string} field
62
+ * @param {{ by: { field: string | null, agg: string }, op: string, value: number, value2?: number } | null} condition
63
+ * @param {object} [previous]
64
+ */
65
+ export declare function setValueFilter(view: any, field: string, condition: {
66
+ by: {
67
+ field: string | null;
68
+ agg: string;
69
+ };
70
+ op: string;
71
+ value: number;
72
+ value2?: number;
73
+ } | null, previous?: object): any;
74
+ /** The filter types the rule editor of the Filter level holds: on the item, its total, its name. */
75
+ export declare const RULE_TYPES: readonly string[];
76
+ /** The most rules one field takes in the Filter level (the view's `limits.filters` counts all fields). */
77
+ export declare const RULES_MAX = 10;
78
+ /**
79
+ * Replaces one rule of a field, `previous` (the view's own entry, matched by its content), with
80
+ * `entry` (a filter of RULE_TYPES), removes it when `entry` is null, or adds `entry` after the field's
81
+ * other filters without `previous`.
82
+ * @param {any} view
83
+ * @param {string} field
84
+ * @param {object | null} previous
85
+ * @param {object | null} entry
86
+ */
87
+ export declare const setRule: (view: any, field: string, previous: object | null, entry: object | null) => any;
88
+ /**
89
+ * How the Filter level's rules compare a field's items. `item`: "number" (a number typed), "date" (a
90
+ * date field or a day grouping: a day chosen), "group" (another grouping: one of its items chosen),
91
+ * null (text and yes/no have no comparison). `dates`: its source is a date (the words "from",
92
+ * "before", the relative ranges); `cyclic`: a grouping that combines the years ("month of the year":
93
+ * Years combined instead of the quick choices); `quick`: the quick choices are offered (a date along
94
+ * the time line); `months`: "Last N months" among them (not for a grouping by year or quarter);
95
+ * `days`: "Last N days" too (a date field or a day grouping). `unit`: the grouping's unit, for the
96
+ * noun of its items.
97
+ * @param {import("pivotkit-core").Encoded} encoded
98
+ * @param {any} view
99
+ * @param {string} field
100
+ * @returns {{ item: "number" | "date" | "group" | null, dates: boolean, cyclic: boolean, quick: boolean, months: boolean, days: boolean, unit: string | null }}
101
+ */
102
+ export declare function ruleKind(encoded: import("pivotkit-core").Encoded, view: any, field: string): {
103
+ item: "number" | "date" | "group" | null;
104
+ dates: boolean;
105
+ cyclic: boolean;
106
+ quick: boolean;
107
+ months: boolean;
108
+ days: boolean;
109
+ unit: string | null;
110
+ };
111
+ /**
112
+ * A rule (RULE_TYPES) in short, as the chip and the Filter level say it: "last 5 years (2022–2026)",
113
+ * "from 2022", "Count of Released > 3", "contains “an”".
114
+ * @param {any} view
115
+ * @param {any} f
116
+ * @param {{ labels: any, locale: string, timeZone: string, date: boolean, labelOf?: (v: number) => string | undefined, span?: { min: number, max: number } | null }} options
117
+ */
118
+ export declare function ruleText(view: any, f: any, { labels, locale, timeZone, date, labelOf, span }: {
119
+ labels: any;
120
+ locale: string;
121
+ timeZone: string;
122
+ date: boolean;
123
+ labelOf?: (v: number) => string | undefined;
124
+ span?: {
125
+ min: number;
126
+ max: number;
127
+ } | null;
128
+ }): string;
129
+ /**
130
+ * The quick choice of a date field's Filter level its filters match: "all" (no relative range),
131
+ * "thisYear", "years", "months" or "days" with their count and anchor (the field's first relative
132
+ * range of a unit that is offered: months and days only where they are) and the filter itself; the
133
+ * field's other ranges and its comparisons are rules. For a cyclic grouping "yearsCombined" with the
134
+ * years its whole-year comparisons keep (`years`, ascending, from `all`, the years of the data) and
135
+ * those filters, "all" without any, else "custom" (its comparisons hold more).
136
+ * @param {any} view
137
+ * @param {string} field
138
+ * @param {{ cyclic: boolean, months: boolean, days: boolean }} fk ruleKind()
139
+ * @param {number[]} [all] the years of the data, for a cyclic grouping
140
+ * @returns {{ id: "all" | "thisYear" | "years" | "months" | "days" | "yearsCombined" | "custom", count?: number, anchor?: string, years?: number[], filters: any[] }}
141
+ */
142
+ export declare function quickChoice(view: any, field: string, fk: {
143
+ cyclic: boolean;
144
+ months: boolean;
145
+ days: boolean;
146
+ }, all?: number[]): {
147
+ id: "all" | "thisYear" | "years" | "months" | "days" | "yearsCombined" | "custom";
148
+ count?: number;
149
+ anchor?: string;
150
+ years?: number[];
151
+ filters: any[];
152
+ };
153
+ /** A comparison of whole years of days (Jan 1 to Dec 31), as Years combined writes them. */
154
+ export declare const isWholeYear: (f: any) => boolean;
155
+ /** The whole-year comparisons that keep `years` of `all` (ascending): the span they cover, less each gap in it. */
156
+ export declare function yearRules(field: any, years: any, all: any): {
157
+ field: any;
158
+ type: string;
159
+ op: any;
160
+ value: string;
161
+ value2: string;
162
+ }[];
163
+ /**
164
+ * Years combined of a cyclic grouping: its whole-year comparisons are replaced by the ones that keep
165
+ * `years` (yearRules); all of the data's years keep none. Its other filters, its other comparisons
166
+ * (rules such as "is from Jun") among them, stay.
167
+ * @param {any} view
168
+ * @param {string} field
169
+ * @param {number[]} years ascending
170
+ * @param {number[]} all the years of the data
171
+ */
172
+ export declare function setYearsCombined(view: any, field: string, years: number[], all: number[]): any;
173
+ /**
174
+ * A quick choice applied: the field's relative ranges are replaced by one range ({ unit, count,
175
+ * anchor }, the anchor "today" not written), or removed for All (null). Its other filters, the
176
+ * comparisons of the item among them, stay: picks, quick choice and rules apply together.
177
+ * @param {any} view
178
+ * @param {string} field
179
+ * @param {{ unit: string, count: number, anchor?: string } | null} range
180
+ */
181
+ export declare function setQuickRange(view: any, field: string, range: {
182
+ unit: string;
183
+ count: number;
184
+ anchor?: string;
185
+ } | null): any;
186
+ /**
187
+ * What the field's relative ranges count back from: "today" (not written) or "latest", the data's
188
+ * latest record. Every range of the field takes it; the view stays the same without one.
189
+ * @param {any} view
190
+ * @param {string} field
191
+ * @param {"today" | "latest"} anchor
192
+ */
193
+ export declare function setAnchor(view: any, field: string, anchor: "today" | "latest"): any;
194
+ /** Takes the whole filter of a field off: its picks, its quick choice and its rules; Top N stays. */
195
+ export declare const resetFilter: (view: any, field: any) => any;
196
+ /**
197
+ * The totals a rule on the total compares, as the table's Grand Total shows them: one per item of
198
+ * the field, the measure over every row the view's other filters and the field's own filters on
199
+ * items leave (`filters`: those to apply; the field's rules on totals are left out, so each rule
200
+ * can say what it keeps). Blank keys are null, as the items' values.
201
+ * @param {import("pivotkit-core").Encoded} encoded
202
+ * @param {any} view normalized
203
+ * @param {string} field
204
+ * @param {{ field: string | null, agg: string }} by
205
+ * @param {any[]} filters
206
+ * @returns {{ totals: Map<string, number | null>, rows: number }} totals by the item's key (JSON), and the rows left
207
+ */
208
+ export declare function itemTotals(encoded: import("pivotkit-core").Encoded, view: any, field: string, by: {
209
+ field: string | null;
210
+ agg: string;
211
+ }, filters: any[]): {
212
+ totals: Map<string, number | null>;
213
+ rows: number;
214
+ };
215
+ /**
216
+ * The measures to choose from with `ref` among them: a sort, a top N or a condition may go by a
217
+ * measure the view no longer shows (its value was removed); it stays a choice, so applying the form
218
+ * again keeps it.
219
+ * @param {Array<{ field: string | null, agg: string }>} choices
220
+ * @param {{ field: string | null, agg: string } | null | undefined} ref
221
+ */
222
+ export declare function withMeasure(choices: Array<{
223
+ field: string | null;
224
+ agg: string;
225
+ }>, ref: {
226
+ field: string | null;
227
+ agg: string;
228
+ } | null | undefined): {
229
+ field: string | null;
230
+ agg: string;
231
+ }[];
232
+ /**
233
+ * The measures a field on an axis can be sorted, ranked and filtered by: each value of the view that
234
+ * gives a number, once per field and aggregator, in the view's order; the row count without one. The
235
+ * first one is the default, as pivotkit-core's.
236
+ * @param {any} view
237
+ * @param {(field: string) => string | undefined} typeOf the column type of a field
238
+ * @returns {Array<{ field: string | null, agg: string }>}
239
+ */
240
+ export declare function measureChoices(view: any, typeOf: (field: string) => string | undefined): Array<{
241
+ field: string | null;
242
+ agg: string;
243
+ }>;
244
+ /**
245
+ * Removes the rules of a field (RULE_TYPES); its picks and Top N stay, and so do `keep`, the filters
246
+ * of the quick choice (quickChoice().filters), in their place.
247
+ */
248
+ export declare function removeRules(view: any, field: any, keep?: any[]): any;
249
+ /** The four totals of Options, in their order. */
250
+ export declare const TOTALS: readonly string[];
251
+ /**
252
+ * Why a total of Options would change nothing in this view, or null when it changes something: a
253
+ * grand total row needs a field in Rows (without one the only row is the total), a grand total column
254
+ * one in Columns, subtotals two or more fields on their axis. The key names the text (labels).
255
+ * @param {any} view
256
+ * @param {string} key one of TOTALS
257
+ * @returns {string | null}
258
+ */
259
+ export declare function totalNoEffect(view: any, key: string): string | null;
260
+ /**
261
+ * The condition on a field's labels its type offers: "text" for text, "number" for a number (on the
262
+ * label as shown), none for a date (or a grouping of one) and a yes/no field, whose items the list
263
+ * above chooses.
264
+ * @param {import("pivotkit-core").Encoded} encoded
265
+ * @param {any} view
266
+ * @param {string} field
267
+ * @returns {"text" | "number" | null}
268
+ */
269
+ export declare function conditionKind(encoded: import("pivotkit-core").Encoded, view: any, field: string): "text" | "number" | null;
270
+ /**
271
+ * What the filter of a field keeps, in short, for its menu's first level and the chip: "15 of 45",
272
+ * "last 5 years (2022–2026)", "from 2022", "contains “abc”", "Sum of Revenue > 1,000", joined by
273
+ * commas; null without a filter.
274
+ * @param {any} view
275
+ * @param {string} field
276
+ * @param {{ summary: { shown: number, total: number } | null, rules?: string[] } | null | undefined} state the chip's state (zones.jsx), with its rules in short
277
+ * @param {import("./labels.js").UiLabels} labels
278
+ * @param {string} locale
279
+ */
280
+ export declare function filterState(view: any, field: string, state: {
281
+ summary: {
282
+ shown: number;
283
+ total: number;
284
+ } | null;
285
+ rules?: string[];
286
+ } | null | undefined, labels: import("./labels.js").UiLabels, locale: string): string | null;
@@ -0,0 +1,2 @@
1
+ /** @type {Readonly<Record<string, () => Promise<import("./menu-labels.js").MenuTexts>>>} */
2
+ export declare const MENU_TEXTS_OF: Readonly<Record<string, () => Promise<import("./menu-labels.js").MenuTexts>>>;