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.
- package/CHANGELOG.md +284 -1
- package/README.md +1 -1
- package/dist/chunks/{chunk-F6MVUAQD.js → chunk-6MDAL3IO.js} +51 -3
- package/dist/chunks/{chunk-53ZMK4BH.js → chunk-EM23V5GH.js} +6 -0
- package/dist/chunks/{chunk-LQCWFJBS.js → chunk-LEN5RPBM.js} +147 -26
- package/dist/chunks/{chunk-OYY4BKIL.js → chunk-RWYHJRQO.js} +6 -0
- package/dist/chunks/{chunk-QBD4FOBB.js → chunk-WB4GKWFQ.js} +124 -18
- package/dist/chunks/chunk-XN55BQ4M.js +618 -0
- package/dist/chunks/{chunk-X7H7BAVT.js → chunk-YITKWZ4L.js} +312 -628
- package/dist/chunks/chunk-ZYEYZSYL.js +187 -0
- package/dist/chunks/{unused-texts-YTNJCFFC.js → unused-texts-K3VFH65P.js} +1 -1
- package/dist/chunks/{unused-texts-de-SGOHV4N7.js → unused-texts-de-OW4TGIVX.js} +1 -1
- package/dist/import-ui.js +769 -0
- package/dist/import-worker.js +20 -0
- package/dist/index.js +653 -227
- package/dist/labels.js +14 -10
- package/dist/menu-texts-de.js +1 -1
- package/dist/menus.js +2499 -676
- package/dist/styles.css +673 -125
- package/package.json +3 -2
- package/types/chip-menus.d.ts +20 -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/dnd.d.ts +8 -4
- package/types/dom.d.ts +40 -7
- package/types/field-info.d.ts +32 -0
- package/types/filter-level.d.ts +16 -0
- package/types/filter.d.ts +31 -0
- package/types/help.d.ts +0 -7
- package/types/import-host.d.ts +53 -0
- package/types/import-labels.d.ts +360 -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 +56 -4
- package/types/labels.d.ts +97 -2
- package/types/lazy-import.d.ts +4 -0
- package/types/lazy-menus.d.ts +2 -2
- package/types/levels.d.ts +106 -0
- package/types/menu-fields.d.ts +80 -0
- package/types/menu-labels.d.ts +214 -22
- package/types/menu-ops.d.ts +150 -9
- package/types/menu-topics.d.ts +291 -0
- package/types/menus.d.ts +2 -1
- package/types/names.d.ts +141 -1
- package/types/overflow.d.ts +29 -17
- package/types/place.d.ts +44 -0
- package/types/popover.d.ts +47 -5
- package/types/section.d.ts +8 -11
- package/types/tips.d.ts +1 -36
- package/types/toasts.d.ts +1 -1
- package/types/toolbar-panels.d.ts +17 -9
- package/types/unused-keep.d.ts +20 -0
- package/types/unused-texts.d.ts +6 -0
- package/types/unused.d.ts +1 -0
- package/types/use-view-history.d.ts +13 -4
- package/types/view-ops.d.ts +12 -0
- package/types/virtual.d.ts +15 -0
- package/types/zones.d.ts +5 -4
- package/types/sections.d.ts +0 -2
package/types/menu-labels.d.ts
CHANGED
|
@@ -18,9 +18,220 @@ export declare const en: {
|
|
|
18
18
|
groupLabels: string;
|
|
19
19
|
labelPosition: string;
|
|
20
20
|
sharedView: string;
|
|
21
|
-
newReport: string;
|
|
22
21
|
valuesFilter: string;
|
|
23
22
|
};
|
|
23
|
+
back: string;
|
|
24
|
+
backTo: string;
|
|
25
|
+
levelTitle: string;
|
|
26
|
+
searchMenu: string;
|
|
27
|
+
searchMenuShort: string;
|
|
28
|
+
searchResults: string;
|
|
29
|
+
searchNothing: string;
|
|
30
|
+
sortByValue: string;
|
|
31
|
+
sortOldestShort: string;
|
|
32
|
+
sortNewestShort: string;
|
|
33
|
+
filterTopic: string;
|
|
34
|
+
filterAll: string;
|
|
35
|
+
groupTopic: string;
|
|
36
|
+
groupNoneShort: string;
|
|
37
|
+
off: string;
|
|
38
|
+
moveToTitle: string;
|
|
39
|
+
topOwn: string;
|
|
40
|
+
binsOff: string;
|
|
41
|
+
valueConditionTitle: string;
|
|
42
|
+
nameHint: string;
|
|
43
|
+
showAsKeywords: string;
|
|
44
|
+
nameKeywords: string;
|
|
45
|
+
filterKeywords: string;
|
|
46
|
+
formatDecimals: {
|
|
47
|
+
one: string;
|
|
48
|
+
other: string;
|
|
49
|
+
};
|
|
50
|
+
listAnd: string;
|
|
51
|
+
summaryAll: string;
|
|
52
|
+
summarySome: string;
|
|
53
|
+
summaryNone: string;
|
|
54
|
+
summaryOk: string;
|
|
55
|
+
summaryKept: string;
|
|
56
|
+
summaryQuickOnly: string;
|
|
57
|
+
summaryPicks: string;
|
|
58
|
+
summaryQuick: string;
|
|
59
|
+
summaryRules: {
|
|
60
|
+
one: string;
|
|
61
|
+
other: string;
|
|
62
|
+
};
|
|
63
|
+
summaryTotals: {
|
|
64
|
+
one: string;
|
|
65
|
+
other: string;
|
|
66
|
+
};
|
|
67
|
+
summaryRows: string;
|
|
68
|
+
summaryData: string;
|
|
69
|
+
yearsAll: string;
|
|
70
|
+
yearsOne: string;
|
|
71
|
+
emptyPicks: string;
|
|
72
|
+
emptyRules: string;
|
|
73
|
+
emptyTotal: string;
|
|
74
|
+
totalSpread: string;
|
|
75
|
+
totalWords: string;
|
|
76
|
+
totalWordsTwo: string;
|
|
77
|
+
resetFilter: string;
|
|
78
|
+
nouns: {
|
|
79
|
+
item: {
|
|
80
|
+
one: string;
|
|
81
|
+
other: string;
|
|
82
|
+
};
|
|
83
|
+
value: {
|
|
84
|
+
one: string;
|
|
85
|
+
other: string;
|
|
86
|
+
};
|
|
87
|
+
date: {
|
|
88
|
+
one: string;
|
|
89
|
+
other: string;
|
|
90
|
+
};
|
|
91
|
+
year: {
|
|
92
|
+
one: string;
|
|
93
|
+
other: string;
|
|
94
|
+
};
|
|
95
|
+
quarter: {
|
|
96
|
+
one: string;
|
|
97
|
+
other: string;
|
|
98
|
+
};
|
|
99
|
+
month: {
|
|
100
|
+
one: string;
|
|
101
|
+
other: string;
|
|
102
|
+
};
|
|
103
|
+
week: {
|
|
104
|
+
one: string;
|
|
105
|
+
other: string;
|
|
106
|
+
};
|
|
107
|
+
day: {
|
|
108
|
+
one: string;
|
|
109
|
+
other: string;
|
|
110
|
+
};
|
|
111
|
+
weekday: {
|
|
112
|
+
one: string;
|
|
113
|
+
other: string;
|
|
114
|
+
};
|
|
115
|
+
hour: {
|
|
116
|
+
one: string;
|
|
117
|
+
other: string;
|
|
118
|
+
};
|
|
119
|
+
range: {
|
|
120
|
+
one: string;
|
|
121
|
+
other: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
quickTitle: string;
|
|
125
|
+
quickCount: {
|
|
126
|
+
year: string;
|
|
127
|
+
month: string;
|
|
128
|
+
day: string;
|
|
129
|
+
};
|
|
130
|
+
quickLast: {
|
|
131
|
+
year: {
|
|
132
|
+
one: string;
|
|
133
|
+
other: string;
|
|
134
|
+
};
|
|
135
|
+
month: {
|
|
136
|
+
one: string;
|
|
137
|
+
other: string;
|
|
138
|
+
};
|
|
139
|
+
day: {
|
|
140
|
+
one: string;
|
|
141
|
+
other: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
quickRows: string;
|
|
145
|
+
quickHidden: {
|
|
146
|
+
one: string;
|
|
147
|
+
other: string;
|
|
148
|
+
};
|
|
149
|
+
anchorLabel: string;
|
|
150
|
+
anchorToday: string;
|
|
151
|
+
anchorLatest: string;
|
|
152
|
+
quickLine: string;
|
|
153
|
+
changeAbove: string;
|
|
154
|
+
yearsCombined: string;
|
|
155
|
+
yearsCombinedHint: string;
|
|
156
|
+
yearsCombinedOne: string;
|
|
157
|
+
pickItems: string;
|
|
158
|
+
picksState: string;
|
|
159
|
+
picksAll: string;
|
|
160
|
+
clear: string;
|
|
161
|
+
clearPicks: string;
|
|
162
|
+
rulesState: {
|
|
163
|
+
one: string;
|
|
164
|
+
other: string;
|
|
165
|
+
};
|
|
166
|
+
rulesNoneState: string;
|
|
167
|
+
removeAll: string;
|
|
168
|
+
removeRules: string;
|
|
169
|
+
tailOut: {
|
|
170
|
+
one: string;
|
|
171
|
+
other: string;
|
|
172
|
+
};
|
|
173
|
+
rulesKeep: string;
|
|
174
|
+
rulesNone: string;
|
|
175
|
+
ruleKeeps: string;
|
|
176
|
+
ruleKeepsNone: string;
|
|
177
|
+
ruleIncomplete: string;
|
|
178
|
+
explainRule: string;
|
|
179
|
+
ruleInfo: {
|
|
180
|
+
number: string;
|
|
181
|
+
date: string;
|
|
182
|
+
group: string;
|
|
183
|
+
cyclic: string;
|
|
184
|
+
total: string;
|
|
185
|
+
name: string;
|
|
186
|
+
};
|
|
187
|
+
scopeItems: string;
|
|
188
|
+
scopeDates: string;
|
|
189
|
+
scopeRows: string;
|
|
190
|
+
pickerSearch: string;
|
|
191
|
+
pickerMatch: string;
|
|
192
|
+
pickerNone: string;
|
|
193
|
+
rulesTitle: string;
|
|
194
|
+
ruleAnd: string;
|
|
195
|
+
addRule: string;
|
|
196
|
+
addRuleItem: string;
|
|
197
|
+
addRuleTotal: string;
|
|
198
|
+
addRuleName: string;
|
|
199
|
+
removeRule: string;
|
|
200
|
+
rulesFull: string;
|
|
201
|
+
ruleName: string;
|
|
202
|
+
ruleValue: string;
|
|
203
|
+
ruleDate: string;
|
|
204
|
+
dateOps: {
|
|
205
|
+
"=": string;
|
|
206
|
+
"!=": string;
|
|
207
|
+
">": string;
|
|
208
|
+
">=": string;
|
|
209
|
+
"<": string;
|
|
210
|
+
"<=": string;
|
|
211
|
+
between: string;
|
|
212
|
+
notBetween: string;
|
|
213
|
+
};
|
|
214
|
+
lastOp: {
|
|
215
|
+
one: string;
|
|
216
|
+
other: string;
|
|
217
|
+
};
|
|
218
|
+
ruleUnits: {
|
|
219
|
+
year: {
|
|
220
|
+
one: string;
|
|
221
|
+
other: string;
|
|
222
|
+
};
|
|
223
|
+
month: {
|
|
224
|
+
one: string;
|
|
225
|
+
other: string;
|
|
226
|
+
};
|
|
227
|
+
day: {
|
|
228
|
+
one: string;
|
|
229
|
+
other: string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
ruleWhose: string;
|
|
233
|
+
blanksOut: string;
|
|
234
|
+
ruleUnit: string;
|
|
24
235
|
moveLeft: string;
|
|
25
236
|
moveRight: string;
|
|
26
237
|
remove: string;
|
|
@@ -59,7 +270,6 @@ export declare const en: {
|
|
|
59
270
|
replaceConfirm: string;
|
|
60
271
|
replaceAction: string;
|
|
61
272
|
replaceSharedConfirm: string;
|
|
62
|
-
newAlready: string;
|
|
63
273
|
save: string;
|
|
64
274
|
cancel: string;
|
|
65
275
|
expandAll: string;
|
|
@@ -103,7 +313,6 @@ export declare const en: {
|
|
|
103
313
|
rename: string;
|
|
104
314
|
sortOldest: string;
|
|
105
315
|
sortNewest: string;
|
|
106
|
-
groupBy: string;
|
|
107
316
|
groupNone: string;
|
|
108
317
|
groupTimeline: string;
|
|
109
318
|
groupCyclic: string;
|
|
@@ -121,16 +330,12 @@ export declare const en: {
|
|
|
121
330
|
bin: string;
|
|
122
331
|
};
|
|
123
332
|
bins: string;
|
|
124
|
-
binsStart: string;
|
|
125
333
|
binsState: string;
|
|
126
334
|
binSize: string;
|
|
127
335
|
binStart: string;
|
|
128
336
|
binStartFar: string;
|
|
129
337
|
apply: string;
|
|
130
|
-
change: string;
|
|
131
|
-
removeSetting: string;
|
|
132
338
|
topN: string;
|
|
133
|
-
topStart: string;
|
|
134
339
|
topCount: string;
|
|
135
340
|
bottom: string;
|
|
136
341
|
topBy: string;
|
|
@@ -173,8 +378,6 @@ export declare const en: {
|
|
|
173
378
|
showTips: string;
|
|
174
379
|
showSettingInfo: string;
|
|
175
380
|
resetTips: string;
|
|
176
|
-
resetSections: string;
|
|
177
|
-
resetSectionsDone: string;
|
|
178
381
|
sectionChanged: string;
|
|
179
382
|
help: string;
|
|
180
383
|
shortcutsTitle: string;
|
|
@@ -233,7 +436,7 @@ export declare const en: {
|
|
|
233
436
|
off: string;
|
|
234
437
|
};
|
|
235
438
|
defaultName: string;
|
|
236
|
-
|
|
439
|
+
shareThisView: string;
|
|
237
440
|
copyLink: string;
|
|
238
441
|
copyJson: string;
|
|
239
442
|
downloadView: string;
|
|
@@ -249,9 +452,8 @@ export declare const en: {
|
|
|
249
452
|
switchStartsFresh: string;
|
|
250
453
|
numberInvalid: string;
|
|
251
454
|
countInvalid: string;
|
|
455
|
+
countMax: string;
|
|
252
456
|
sizeInvalid: string;
|
|
253
|
-
chooseValues: string;
|
|
254
|
-
valueFilter: string;
|
|
255
457
|
valueFilterBy: string;
|
|
256
458
|
valueFilterOp: string;
|
|
257
459
|
valueFilterNumber: string;
|
|
@@ -266,7 +468,6 @@ export declare const en: {
|
|
|
266
468
|
between: string;
|
|
267
469
|
notBetween: string;
|
|
268
470
|
};
|
|
269
|
-
removeFilter: string;
|
|
270
471
|
moreFormats: string;
|
|
271
472
|
totals: string;
|
|
272
473
|
grandTotalRow: string;
|
|
@@ -289,15 +490,6 @@ export declare const en: {
|
|
|
289
490
|
other: string;
|
|
290
491
|
};
|
|
291
492
|
chartDisplay: string;
|
|
292
|
-
labelOps: {
|
|
293
|
-
equals: string;
|
|
294
|
-
notEquals: string;
|
|
295
|
-
contains: string;
|
|
296
|
-
notContains: string;
|
|
297
|
-
beginsWith: string;
|
|
298
|
-
endsWith: string;
|
|
299
|
-
};
|
|
300
|
-
filterIs: string;
|
|
301
493
|
toastExported: string;
|
|
302
494
|
toastLinkCopied: string;
|
|
303
495
|
toastJsonCopied: string;
|
package/types/menu-ops.d.ts
CHANGED
|
@@ -71,6 +71,147 @@ export declare function setValueFilter(view: any, field: string, condition: {
|
|
|
71
71
|
value: number;
|
|
72
72
|
value2?: number;
|
|
73
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
|
+
};
|
|
74
215
|
/**
|
|
75
216
|
* The measures to choose from with `ref` among them: a sort, a top N or a condition may go by a
|
|
76
217
|
* measure the view no longer shows (its value was removed); it stays a choice, so applying the form
|
|
@@ -101,12 +242,10 @@ export declare function measureChoices(view: any, typeOf: (field: string) => str
|
|
|
101
242
|
agg: string;
|
|
102
243
|
}>;
|
|
103
244
|
/**
|
|
104
|
-
* Removes
|
|
105
|
-
*
|
|
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.
|
|
106
247
|
*/
|
|
107
|
-
export declare function
|
|
108
|
-
/** True when a field has an item, text or value filter that removes something (Top N is not counted). */
|
|
109
|
-
export declare function hasFilter(view: any, field: any): any;
|
|
248
|
+
export declare function removeRules(view: any, field: any, keep?: any[]): any;
|
|
110
249
|
/** The four totals of Options, in their order. */
|
|
111
250
|
export declare const TOTALS: readonly string[];
|
|
112
251
|
/**
|
|
@@ -129,17 +268,19 @@ export declare function totalNoEffect(view: any, key: string): string | null;
|
|
|
129
268
|
*/
|
|
130
269
|
export declare function conditionKind(encoded: import("pivotkit-core").Encoded, view: any, field: string): "text" | "number" | null;
|
|
131
270
|
/**
|
|
132
|
-
* What the filter of a field keeps, for its menu: "
|
|
133
|
-
* "
|
|
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.
|
|
134
274
|
* @param {any} view
|
|
135
275
|
* @param {string} field
|
|
136
|
-
* @param {{ summary: { shown: number, total: number } | null } | null | undefined} state the chip's state (zones.jsx)
|
|
276
|
+
* @param {{ summary: { shown: number, total: number } | null, rules?: string[] } | null | undefined} state the chip's state (zones.jsx), with its rules in short
|
|
137
277
|
* @param {import("./labels.js").UiLabels} labels
|
|
138
278
|
* @param {string} locale
|
|
139
279
|
*/
|
|
140
|
-
export declare function
|
|
280
|
+
export declare function filterState(view: any, field: string, state: {
|
|
141
281
|
summary: {
|
|
142
282
|
shown: number;
|
|
143
283
|
total: number;
|
|
144
284
|
} | null;
|
|
285
|
+
rules?: string[];
|
|
145
286
|
} | null | undefined, labels: import("./labels.js").UiLabels, locale: string): string | null;
|