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.
- package/CHANGELOG.md +306 -1
- package/README.md +48 -298
- package/dist/chunks/{chunk-ILHFIV2P.js → chunk-32Z33U6S.js} +58 -78
- package/dist/chunks/chunk-7CC4JHDY.js +363 -0
- package/dist/chunks/chunk-APB4NW4O.js +434 -0
- package/dist/chunks/chunk-EM23V5GH.js +183 -0
- package/dist/chunks/{chunk-KKJO36W5.js → chunk-IOPAM4JD.js} +412 -365
- package/dist/chunks/chunk-RWYHJRQO.js +99 -0
- package/dist/chunks/unused-texts-K3VFH65P.js +10 -0
- package/dist/chunks/unused-texts-de-OW4TGIVX.js +6 -0
- package/dist/echarts.js +96 -11
- package/dist/index.js +654 -560
- package/dist/labels.js +13 -4
- package/dist/menu-texts-de.js +6 -0
- package/dist/menus.js +2905 -550
- package/dist/styles.css +738 -216
- package/package.json +2 -2
- package/types/chart-layout.d.ts +111 -0
- package/types/chart-types.d.ts +0 -91
- package/types/chip-menus.d.ts +20 -4
- package/types/dnd.d.ts +8 -4
- package/types/drill-panel.d.ts +5 -22
- package/types/drill-table.d.ts +71 -0
- package/types/drill.d.ts +0 -36
- package/types/filter-level.d.ts +16 -0
- package/types/filter.d.ts +31 -0
- package/types/help.d.ts +14 -0
- package/types/icons.d.ts +4 -0
- package/types/labels.d.ts +114 -101
- package/types/lazy-menus.d.ts +18 -6
- package/types/levels.d.ts +105 -0
- package/types/menu-fields.d.ts +80 -0
- package/types/menu-labels-de.d.ts +2 -0
- package/types/menu-labels.d.ts +270 -13
- package/types/menu-ops.d.ts +286 -0
- package/types/menu-texts.d.ts +2 -0
- package/types/menu-topics.d.ts +293 -0
- package/types/menus.d.ts +2 -2
- package/types/names.d.ts +160 -20
- package/types/overflow.d.ts +4 -1
- package/types/place.d.ts +44 -0
- package/types/popover.d.ts +10 -6
- package/types/section.d.ts +8 -28
- package/types/share-actions.d.ts +99 -0
- package/types/share.d.ts +0 -9
- package/types/table.d.ts +9 -3
- package/types/templates.d.ts +7 -1
- package/types/tips.d.ts +1 -34
- package/types/toolbar-panels.d.ts +20 -10
- package/types/unused-load.d.ts +23 -0
- package/types/unused-texts-de.d.ts +2 -0
- package/types/unused-texts.d.ts +136 -0
- package/types/unused.d.ts +22 -0
- package/types/use-view-history.d.ts +8 -4
- package/types/view-history.d.ts +23 -6
- package/types/view-ops.d.ts +80 -119
- package/types/view-save.d.ts +76 -0
- package/types/view-store.d.ts +13 -6
- package/types/zones.d.ts +5 -4
- package/dist/chunks/chunk-C32TYSHG.js +0 -441
- package/dist/chunks/chunk-XYP47DJ3.js +0 -123
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MENU_TEXTS,
|
|
3
|
+
mergeLabels
|
|
4
|
+
} from "./chunk-32Z33U6S.js";
|
|
5
|
+
|
|
6
|
+
// src/menu-labels.js
|
|
7
|
+
var en = {
|
|
8
|
+
// the "i" next to a setting that needs explaining (Options → Help → Show explanations)
|
|
9
|
+
aboutSetting: "About {setting}",
|
|
10
|
+
settingInfo: {
|
|
11
|
+
grandTotalRow: "A last row with the total of every column.",
|
|
12
|
+
grandTotalColumn: "A last column with the total of every row.",
|
|
13
|
+
rowSubtotals: "With two or more fields in Rows: a total row under each group of the outer field.",
|
|
14
|
+
colSubtotals: "With two or more fields in Columns: a total column after each group of the outer field.",
|
|
15
|
+
along: "The direction the calculation walks: Rows goes down the rows of each column, Columns across the columns of each row. A running total adds up along it, a difference compares with the item before it.",
|
|
16
|
+
showAs: "Shows each value as a share, a difference, a running total or a rank instead of the number itself. For percentages, a tip above the result says what 100% is.",
|
|
17
|
+
exportXlsx: "Every number with all its decimals, formats kept, ready to calculate with.",
|
|
18
|
+
exportCsv: "Percentages and calculations as the table shows them, as plain text.",
|
|
19
|
+
copyTable: "The table as it is shown, headers and totals included: tab-separated, pastes into Excel or Google Sheets as columns.",
|
|
20
|
+
copyDataJson: "The table's numbers with their labels as JSON, for a program. Not the view itself: that is Views \u2192 Copy view as JSON.",
|
|
21
|
+
drillCopy: "The rows as the panel shows them, with a header row: tab-separated, pastes into Excel or Google Sheets as columns.",
|
|
22
|
+
drillJson: "The rows as JSON objects, with the data's field names and raw values, for a program.",
|
|
23
|
+
groupLabels: "With two or more fields in Rows: the outer field's items written once under the axis, below their categories.",
|
|
24
|
+
labelPosition: "Outside: each slice's name and number next to it. Inside: the number on the slice, the names in the legend; outside when a donut's ring is too thin for it.",
|
|
25
|
+
sharedView: "Only admins can change shared views.",
|
|
26
|
+
newReport: "Takes every field out, to start over. Undo brings them back; saved views stay.",
|
|
27
|
+
valuesFilter: "Values are not filtered here: filter a field on Rows or Columns through its menu, or move a field to Filters."
|
|
28
|
+
},
|
|
29
|
+
// a menu in levels: the way back, a level's title, the search of a menu
|
|
30
|
+
back: "Back",
|
|
31
|
+
backTo: "Back to the menu of {name}",
|
|
32
|
+
levelTitle: "{name} \u203A {topic}",
|
|
33
|
+
searchMenu: "Search in the menu of {name}",
|
|
34
|
+
searchMenuShort: "Search in this menu (key /)",
|
|
35
|
+
searchResults: "Results",
|
|
36
|
+
searchNothing: "Nothing found. Try another word, or clear the search.",
|
|
37
|
+
// the topics of a field's menu and what they show when nothing is set
|
|
38
|
+
sortByValue: "Sort by value",
|
|
39
|
+
sortOldestShort: "Oldest",
|
|
40
|
+
sortNewestShort: "Newest",
|
|
41
|
+
filterTopic: "Filter",
|
|
42
|
+
filterAll: "All",
|
|
43
|
+
groupTopic: "Group",
|
|
44
|
+
groupNoneShort: "None",
|
|
45
|
+
off: "Off",
|
|
46
|
+
moveToTitle: "Move to",
|
|
47
|
+
topOwn: "Top N\u2026",
|
|
48
|
+
binsOff: "Remove ranges",
|
|
49
|
+
// the Filter level: how many items the list keeps, the condition on a value as a sentence
|
|
50
|
+
valueConditionTitle: "Condition on a value",
|
|
51
|
+
nameHint: "Applies with Enter or when you leave the field; Escape gives the name back.",
|
|
52
|
+
// more words the search of a menu finds an entry by
|
|
53
|
+
showAsKeywords: "percent % share",
|
|
54
|
+
nameKeywords: "rename label title",
|
|
55
|
+
filterKeywords: "values pick choose rule rules condition range dates",
|
|
56
|
+
formatDecimals: { one: "Number, {count} decimal", other: "Number, {count} decimals" },
|
|
57
|
+
// the Filter level: what it keeps in words, what its buttons take away, its folded part
|
|
58
|
+
listAnd: " and ",
|
|
59
|
+
// the Filter level's summary card: what shows, why not the rest, the rows and the data's dates
|
|
60
|
+
summaryAll: "All {total} {noun} shown",
|
|
61
|
+
summarySome: "{shown} of {total} {noun} shown",
|
|
62
|
+
summaryNone: "Nothing shown",
|
|
63
|
+
summaryOk: "Every item is picked, no rules.",
|
|
64
|
+
summaryKept: "Every item is picked; the rules keep them all.",
|
|
65
|
+
summaryQuickOnly: "Every item is picked; {quick}.",
|
|
66
|
+
summaryPicks: "{count} left out by your picks",
|
|
67
|
+
summaryQuick: "{count} outside {quick}",
|
|
68
|
+
// {items}: the items left out; the plural form goes by the number of rules
|
|
69
|
+
summaryRules: { one: "{items} left out by the rule", other: "{items} left out by the rules" },
|
|
70
|
+
summaryTotals: { one: "{items} left out by the rule on the total", other: "{items} left out by the rules on the totals" },
|
|
71
|
+
summaryRows: "{rows} of {total} rows",
|
|
72
|
+
summaryData: "data {range}",
|
|
73
|
+
yearsAll: "{years} combined",
|
|
74
|
+
yearsOne: "{year} only",
|
|
75
|
+
emptyPicks: "Nothing is picked.",
|
|
76
|
+
emptyRules: "No {noun} meets {rules}.",
|
|
77
|
+
emptyTotal: "No {noun} has a total {rule} \u2013 {spread}.",
|
|
78
|
+
totalSpread: "the totals go from {low} ({lowItem}) to {high} ({highItem})",
|
|
79
|
+
totalWords: "{measure} that {op} {number}",
|
|
80
|
+
totalWordsTwo: "{measure} that {op} {from} and {to}",
|
|
81
|
+
resetFilter: "Reset filter",
|
|
82
|
+
// the nouns of a field's items, by its grouping ("3 of 12 months shown")
|
|
83
|
+
nouns: {
|
|
84
|
+
item: { one: "item", other: "items" },
|
|
85
|
+
value: { one: "value", other: "values" },
|
|
86
|
+
date: { one: "date", other: "dates" },
|
|
87
|
+
year: { one: "year", other: "years" },
|
|
88
|
+
quarter: { one: "quarter", other: "quarters" },
|
|
89
|
+
month: { one: "month", other: "months" },
|
|
90
|
+
week: { one: "week", other: "weeks" },
|
|
91
|
+
day: { one: "day", other: "days" },
|
|
92
|
+
weekday: { one: "weekday", other: "weekdays" },
|
|
93
|
+
hour: { one: "hour", other: "hours" },
|
|
94
|
+
range: { one: "range", other: "ranges" }
|
|
95
|
+
},
|
|
96
|
+
// the Filter level of a date field: its quick choices ("Last [5] years" around the number typed),
|
|
97
|
+
// each with the data's share and the rows it keeps, the ones not offered, the reference date
|
|
98
|
+
quickTitle: "Quick choices",
|
|
99
|
+
quickCount: { year: "Number of years", month: "Number of months", day: "Number of days" },
|
|
100
|
+
quickLast: { year: { one: "Last {count} year", other: "Last {count} years" }, month: { one: "Last {count} month", other: "Last {count} months" }, day: { one: "Last {count} day", other: "Last {count} days" } },
|
|
101
|
+
quickRows: "{rows} rows",
|
|
102
|
+
quickHidden: { one: "{choices} is not offered: the data end {latest}.", other: "{choices} are not offered: the data end {latest}." },
|
|
103
|
+
anchorLabel: "Counted back from",
|
|
104
|
+
anchorToday: "today ({date})",
|
|
105
|
+
anchorLatest: "the latest record ({date})",
|
|
106
|
+
quickLine: "Quick choice: {text}",
|
|
107
|
+
changeAbove: "change it above",
|
|
108
|
+
// a cyclic grouping ("month of the year") combines the years: the ones ticked
|
|
109
|
+
yearsCombined: "Years combined",
|
|
110
|
+
yearsCombinedHint: "one {noun} over the years ticked",
|
|
111
|
+
yearsCombinedOne: "The table shows {year} only.",
|
|
112
|
+
// the foldable sections: the items to pick, the rules, with their state and what takes them off
|
|
113
|
+
pickItems: "Pick items",
|
|
114
|
+
picksState: "{picked} of {total} picked",
|
|
115
|
+
picksAll: "all {total} picked",
|
|
116
|
+
clear: "Clear",
|
|
117
|
+
clearPicks: "Clear picks",
|
|
118
|
+
rulesState: { one: "{count} rule", other: "{count} rules" },
|
|
119
|
+
rulesNoneState: "No rules",
|
|
120
|
+
removeAll: "Remove",
|
|
121
|
+
removeRules: "Remove the rules",
|
|
122
|
+
tailOut: { one: "Left out by the rules ({count}) \u2013 its tick applies again once they go", other: "Left out by the rules ({count}) \u2013 their ticks apply again once they go" },
|
|
123
|
+
rulesKeep: "Keep the {noun} for which all of these are true:",
|
|
124
|
+
rulesNone: "Keep the {noun} for which all of these are true. Add one below.",
|
|
125
|
+
ruleKeeps: "Keeps {kept} of {total} {noun}",
|
|
126
|
+
ruleKeepsNone: "Keeps 0 of {total} {noun} \u2013 {spread}.",
|
|
127
|
+
ruleIncomplete: "Applies once it is complete.",
|
|
128
|
+
explainRule: "Explain this rule",
|
|
129
|
+
// the "i" of a rule: what it compares, with an example
|
|
130
|
+
ruleInfo: {
|
|
131
|
+
number: "Compares the value itself, not its total. Example: \u201Cis between 20 and 25\u201D keeps the values from 20 to 25.",
|
|
132
|
+
date: "Compares each date by its calendar day. Example: \u201Cis before Mar 1, 2022\u201D keeps every day up to Feb 28, 2022.",
|
|
133
|
+
group: "Compares each {noun} by its place on the time line. Example: \u201Cis from 2022\u201D keeps 2022 and every later one.",
|
|
134
|
+
cyclic: "Compares each {noun} by its place in the year, over all the years combined. Example: \u201Cis from Jun\u201D keeps Jun to Dec.",
|
|
135
|
+
total: "The total is the {noun}\u2019s Grand Total \u2013 the {measure} over {scope}, as the Grand Total row shows it \u2013 not a single cell. Example: \u201Cis greater than 20\u201D keeps the {nouns} whose total is above 20.",
|
|
136
|
+
name: "Compares the name of each {noun} as the table writes it. Example: \u201Ccontains ar\u201D keeps Mar and March."
|
|
137
|
+
},
|
|
138
|
+
scopeItems: "all {count} {field} items",
|
|
139
|
+
scopeDates: "the dates {range}",
|
|
140
|
+
scopeRows: "every row",
|
|
141
|
+
// the searchable picker of a rule's item (a long list): its search, its matches
|
|
142
|
+
pickerSearch: "Search items",
|
|
143
|
+
pickerMatch: "{count} of {total} match",
|
|
144
|
+
pickerNone: "No match",
|
|
145
|
+
// the rules under "More ways to filter", all of them together: on the item, its total, its name
|
|
146
|
+
rulesTitle: "Rules",
|
|
147
|
+
ruleAnd: "and",
|
|
148
|
+
addRule: "Add a rule",
|
|
149
|
+
addRuleItem: "Compare {field}",
|
|
150
|
+
addRuleTotal: "Compare its total",
|
|
151
|
+
addRuleName: "Rule on the name",
|
|
152
|
+
removeRule: "Remove this rule",
|
|
153
|
+
rulesFull: "At most {max} rules per field.",
|
|
154
|
+
ruleName: "The name",
|
|
155
|
+
ruleValue: "Value",
|
|
156
|
+
ruleDate: "Date",
|
|
157
|
+
dateOps: { "=": "is", "!=": "is not", ">": "is after", ">=": "is from", "<": "is before", "<=": "is up to", between: "is between", notBetween: "is not between" },
|
|
158
|
+
lastOp: { one: "is in the last", other: "is in the last" },
|
|
159
|
+
ruleUnits: { year: { one: "year", other: "years" }, month: { one: "month", other: "months" }, day: { one: "day", other: "days" } },
|
|
160
|
+
// a rule on the total, as a sentence: "Product items whose / Count of Cycle / is greater than / 3"
|
|
161
|
+
ruleWhose: "{field} items whose total",
|
|
162
|
+
blanksOut: "Blank items are not kept.",
|
|
163
|
+
ruleUnit: "Unit",
|
|
164
|
+
moveLeft: "Move left",
|
|
165
|
+
moveRight: "Move right",
|
|
166
|
+
// the last item of a chip menu: takes the field (or value) out of the report
|
|
167
|
+
remove: "Remove field",
|
|
168
|
+
// the hint of "Automatic" in the chart type menu: the type it draws for this view
|
|
169
|
+
chartAutoNow: "Now: {type}",
|
|
170
|
+
// the Views menu: the host's shared views, the user's own ("My views") and the browser store
|
|
171
|
+
sharedViews: "Shared views",
|
|
172
|
+
myViews: "My views",
|
|
173
|
+
noViews: "No saved views yet.",
|
|
174
|
+
// My views of the browser store while it is empty: one line with the storage note's gist
|
|
175
|
+
noViewsStore: "None yet. Saved views stay in this browser only.",
|
|
176
|
+
publishView: "Publish {name} as a shared view",
|
|
177
|
+
publishConfirm: "Publish \u201C{name}\u201D as a shared view? Everyone who uses this report sees it.",
|
|
178
|
+
publishAction: "Publish",
|
|
179
|
+
storeNote: "Kept in this browser only: not on other devices, and gone when the site's data is cleared.",
|
|
180
|
+
storeFull: "this browser keeps at most {max} views",
|
|
181
|
+
storeTooLarge: "the views would take more than {max} characters",
|
|
182
|
+
storeRefused: "this browser did not keep it (storage blocked or full)",
|
|
183
|
+
storeChanged: "the views were changed in another tab; open the menu again",
|
|
184
|
+
// what a save, a delete or a publish in the Views menu came to; "Rejected": the host refused
|
|
185
|
+
// without saying why (a rejected promise without a message)
|
|
186
|
+
toastSaved: "View \u201C{name}\u201D saved",
|
|
187
|
+
toastDeleted: "View \u201C{name}\u201D deleted",
|
|
188
|
+
toastPublished: "View \u201C{name}\u201D published",
|
|
189
|
+
toastSaveFailed: "The view could not be saved: {message}",
|
|
190
|
+
toastDeleteFailed: "The view could not be deleted: {message}",
|
|
191
|
+
toastPublishFailed: "The view could not be published: {message}",
|
|
192
|
+
toastSaveRejected: "The server could not save the view.",
|
|
193
|
+
toastDeleteRejected: "The server could not delete the view.",
|
|
194
|
+
toastPublishRejected: "The server could not publish the view.",
|
|
195
|
+
deleteView: "Delete {name}",
|
|
196
|
+
deleteConfirm: "Delete \u201C{name}\u201D?",
|
|
197
|
+
deleteAction: "Delete",
|
|
198
|
+
saveView: "Save current view",
|
|
199
|
+
viewName: "Name of the view",
|
|
200
|
+
// the Views menu's first group: the view shown; Save writes the loaded view under its name
|
|
201
|
+
thisView: "This view",
|
|
202
|
+
saveNamed: "Save \u201C{name}\u201D",
|
|
203
|
+
saveAs: "Save as\u2026",
|
|
204
|
+
saveSharedLocked: "Shared view: you cannot change it. Use Save as.",
|
|
205
|
+
saveNotInViews: "Not saved yet. Use Save as.",
|
|
206
|
+
replaceConfirm: "\u201C{name}\u201D exists. Replace it?",
|
|
207
|
+
replaceAction: "Replace",
|
|
208
|
+
replaceSharedConfirm: "Replace the shared view \u201C{name}\u201D for everyone?",
|
|
209
|
+
newAlready: "The report is empty already.",
|
|
210
|
+
save: "Save",
|
|
211
|
+
cancel: "Cancel",
|
|
212
|
+
expandAll: "Expand all",
|
|
213
|
+
collapseAll: "Collapse all",
|
|
214
|
+
// chip menus
|
|
215
|
+
aggregation: "Summarize by",
|
|
216
|
+
moreStatistics: "More statistics",
|
|
217
|
+
showAsNone: "The value itself",
|
|
218
|
+
moreCalculations: "More calculations",
|
|
219
|
+
showAsNames: {
|
|
220
|
+
percentOfGrandTotal: "% of grand total",
|
|
221
|
+
percentOfRowTotal: "% of row total",
|
|
222
|
+
percentOfColumnTotal: "% of column total",
|
|
223
|
+
percentOfParentRow: "% of parent row",
|
|
224
|
+
percentOfParentColumn: "% of parent column",
|
|
225
|
+
differenceFromPrevious: "Difference from previous",
|
|
226
|
+
percentDifferenceFromPrevious: "% difference from previous",
|
|
227
|
+
runningTotal: "Running total",
|
|
228
|
+
percentRunningTotal: "% running total",
|
|
229
|
+
rankAscending: "Rank, smallest first",
|
|
230
|
+
rankDescending: "Rank, largest first"
|
|
231
|
+
},
|
|
232
|
+
along: "Along",
|
|
233
|
+
format: "Number format",
|
|
234
|
+
formatAuto: "Automatic",
|
|
235
|
+
formats: {
|
|
236
|
+
number: "Number",
|
|
237
|
+
"number:0": "Number, no decimals",
|
|
238
|
+
"number:2": "Number, 2 decimals",
|
|
239
|
+
integer: "Whole number",
|
|
240
|
+
currency: "Currency",
|
|
241
|
+
percent: "Percent",
|
|
242
|
+
compact: "Compact (1.2K)",
|
|
243
|
+
bytes: "Bytes (KB, MB)",
|
|
244
|
+
"duration:h": "Duration from hours",
|
|
245
|
+
"duration:s": "Duration from seconds"
|
|
246
|
+
},
|
|
247
|
+
conditional: "Highlight",
|
|
248
|
+
conditionalNone: "None",
|
|
249
|
+
colorScale: "Colour scale",
|
|
250
|
+
dataBar: "Data bars",
|
|
251
|
+
rename: "Name",
|
|
252
|
+
sortOldest: "Oldest first",
|
|
253
|
+
sortNewest: "Newest first",
|
|
254
|
+
groupNone: "No grouping (every date and time)",
|
|
255
|
+
groupTimeline: "Along the time line",
|
|
256
|
+
groupCyclic: "Same period every year",
|
|
257
|
+
unitHints: {
|
|
258
|
+
year: "2025",
|
|
259
|
+
yearQuarter: "Q1 2025",
|
|
260
|
+
yearMonth: "Jan 2025",
|
|
261
|
+
yearWeek: "2025-W03",
|
|
262
|
+
day: "Jan 15, 2025",
|
|
263
|
+
quarter: "Q1 of every year",
|
|
264
|
+
month: "Jan of every year",
|
|
265
|
+
week: "W03 of every year",
|
|
266
|
+
weekday: "Mon to Sun",
|
|
267
|
+
hour: "00:00 to 23:00",
|
|
268
|
+
bin: ""
|
|
269
|
+
},
|
|
270
|
+
bins: "Number ranges",
|
|
271
|
+
binsState: "Ranges of {size} from {start}",
|
|
272
|
+
binSize: "Range size",
|
|
273
|
+
binStart: "Starting at",
|
|
274
|
+
binStartFar: "Ranges from {start} cannot hold this field's values ({min} to {max}): every row would be blank. Pick a start closer to them.",
|
|
275
|
+
apply: "Apply",
|
|
276
|
+
// the Top items level
|
|
277
|
+
topN: "Top items",
|
|
278
|
+
topCount: "Count",
|
|
279
|
+
bottom: "Bottom",
|
|
280
|
+
topBy: "by",
|
|
281
|
+
searchValues: "Search values",
|
|
282
|
+
selectAll: "Select all",
|
|
283
|
+
selectNone: "Select none",
|
|
284
|
+
onlyThis: "Only",
|
|
285
|
+
valuesShown: "{shown} of {total} values; search to find more",
|
|
286
|
+
conditionNumber: "Condition on the label",
|
|
287
|
+
conditionNone: "No condition",
|
|
288
|
+
conditionValue: "Text",
|
|
289
|
+
selected: "{count} selected",
|
|
290
|
+
// the Export menu
|
|
291
|
+
exportDownload: "Download",
|
|
292
|
+
exportCopy: "Copy",
|
|
293
|
+
exportXlsx: "Excel workbook (.xlsx)",
|
|
294
|
+
exportCsv: "CSV file (.csv)",
|
|
295
|
+
exportPng: "Chart image (.png)",
|
|
296
|
+
exportPngNeedsChart: "Switch to Chart first.",
|
|
297
|
+
exportNeedsField: "Add a field first.",
|
|
298
|
+
copyTable: "Copy table",
|
|
299
|
+
copyDataJson: "Copy data as JSON",
|
|
300
|
+
toastTableCopied: "Table copied: tab-separated, pastes into Excel or Google Sheets as columns",
|
|
301
|
+
toastDataCopied: "Data copied as JSON",
|
|
302
|
+
toastCopyBlocked: "This page does not allow copying. Download a file instead.",
|
|
303
|
+
// drill-down
|
|
304
|
+
drillTitle: "Rows behind this value",
|
|
305
|
+
drillCount: { one: "{count} row", other: "{count} rows" },
|
|
306
|
+
drillShown: "Showing the first {shown} of {count} rows",
|
|
307
|
+
drillCopy: "Copy",
|
|
308
|
+
drillJson: "Copy as JSON",
|
|
309
|
+
drillCsv: "Download CSV",
|
|
310
|
+
drillXlsx: "Download Excel",
|
|
311
|
+
// what an export of the panel's rows holds: all of them, or the first of more
|
|
312
|
+
drillPart: "{shown} of {count} rows",
|
|
313
|
+
drillCopied: "Copied {rows}: tab-separated, pastes into Excel or Google Sheets as columns",
|
|
314
|
+
drillCopiedJson: "Copied {rows} as JSON",
|
|
315
|
+
drillExported: "Exported {file} ({rows})",
|
|
316
|
+
drillExportNote: "Holds the first {shown} of {count} rows, as shown here.",
|
|
317
|
+
showTips: "Show tips",
|
|
318
|
+
// the "i" of the settings, the zones and the field descriptions
|
|
319
|
+
showSettingInfo: "Show explanations",
|
|
320
|
+
resetTips: "Show dismissed tips again",
|
|
321
|
+
// read after the state of a menu row when it is not the default (its dot)
|
|
322
|
+
sectionChanged: ", changed",
|
|
323
|
+
help: "Help",
|
|
324
|
+
shortcutsTitle: "Keyboard shortcuts",
|
|
325
|
+
// the keys of the shortcuts; "Mod" is Ctrl, or ⌘ on a Mac
|
|
326
|
+
keys: { Mod: "Ctrl", Shift: "Shift", "Arrow keys": "Arrow keys", Enter: "Enter", Space: "Space", Escape: "Escape", F10: "F10" },
|
|
327
|
+
shortcuts: {
|
|
328
|
+
undo: "Undo",
|
|
329
|
+
redo: "Redo",
|
|
330
|
+
move: "Move between values in the table",
|
|
331
|
+
open: "Open the rows behind a value; sort by a header; open a menu",
|
|
332
|
+
drag: "Pick up a field or chip, and drop it",
|
|
333
|
+
close: "Close a menu, a panel or a tip",
|
|
334
|
+
fields: "In the field list: up and down between fields, left and right to a field's grip, its \u201Ci\u201D and its menu",
|
|
335
|
+
fieldMenu: "Open the menu of the field in focus"
|
|
336
|
+
},
|
|
337
|
+
valueLabels: "Value labels",
|
|
338
|
+
valueLabelNames: { auto: "Automatic", off: "Off", value: "Value", percent: "Percent", both: "Value and percent" },
|
|
339
|
+
legend: "Legend",
|
|
340
|
+
legendNames: { auto: "Automatic", bottom: "Bottom", right: "Right", off: "Off" },
|
|
341
|
+
chartTitle: "Title",
|
|
342
|
+
chartTitleNone: "No title",
|
|
343
|
+
smoothLines: "Smooth lines",
|
|
344
|
+
labelPosition: "Labels",
|
|
345
|
+
labelPositionNames: { outside: "Outside", inside: "Inside" },
|
|
346
|
+
axisLabels: "Axis labels",
|
|
347
|
+
axisLabelNames: { auto: "Automatic", all: "All (slanted)", nth: "Every n-th" },
|
|
348
|
+
groupLabels: "Group labels under the axis",
|
|
349
|
+
groupLabelNames: { auto: "Automatic", on: "On", off: "Off" },
|
|
350
|
+
defaultName: "Use the default name",
|
|
351
|
+
// sharing a view (the Views menu): the group heading above the Share row, and the row
|
|
352
|
+
shareThisView: "Share this view",
|
|
353
|
+
share: "Share",
|
|
354
|
+
copyLink: "Copy link",
|
|
355
|
+
copyJson: "Copy view as JSON",
|
|
356
|
+
downloadView: "Download view (.pivotkit.json)",
|
|
357
|
+
// said where a view leaves the report as a file, as JSON or as a link
|
|
358
|
+
sharePrivacy: "A view holds the names of fields and, in its filters, the values chosen there: share it only where those may be seen.",
|
|
359
|
+
loadView: "Load view\u2026",
|
|
360
|
+
loadViewHint: "Paste a view file, a view as JSON or a link, or choose a .pivotkit.json file.",
|
|
361
|
+
loadViewText: "View as JSON or link",
|
|
362
|
+
chooseFile: "Choose file\u2026",
|
|
363
|
+
load: "Load",
|
|
364
|
+
// before a view for other data is loaded: what does not fit, and the choices
|
|
365
|
+
loadCheckTitle: "This view may not fit this data",
|
|
366
|
+
loadAnyway: "Load anyway",
|
|
367
|
+
switchAndLoad: "Switch to \u201C{source}\u201D and load",
|
|
368
|
+
switchStartsFresh: "Switching shows the other data with this view; Undo starts there.",
|
|
369
|
+
numberInvalid: "Enter a number, such as {example}.",
|
|
370
|
+
countInvalid: "Enter a whole number of 1 or more.",
|
|
371
|
+
countMax: "Enter a whole number up to {max}.",
|
|
372
|
+
sizeInvalid: "Enter a number above 0, such as {example}.",
|
|
373
|
+
valueFilterBy: "Value",
|
|
374
|
+
valueFilterOp: "Condition",
|
|
375
|
+
valueFilterNumber: "Number",
|
|
376
|
+
valueFilterTo: "and",
|
|
377
|
+
// a value condition as a sentence: "… whose Sum of Units is greater than 10"
|
|
378
|
+
valueOps: { "=": "is", "!=": "is not", ">": "is greater than", ">=": "is at least", "<": "is less than", "<=": "is at most", between: "is between", notBetween: "is not between" },
|
|
379
|
+
// the second group of a level's choices
|
|
380
|
+
moreFormats: "More formats",
|
|
381
|
+
// Options: the totals, and why one would change nothing; expand and collapse all, and what they did
|
|
382
|
+
totals: "Totals",
|
|
383
|
+
grandTotalRow: "Grand total row",
|
|
384
|
+
grandTotalColumn: "Grand total column",
|
|
385
|
+
rowSubtotals: "Row subtotals",
|
|
386
|
+
colSubtotals: "Column subtotals",
|
|
387
|
+
needsRowField: "Needs a field in Rows.",
|
|
388
|
+
needsColField: "Needs a field in Columns.",
|
|
389
|
+
needsRowFields: "Needs two or more fields in Rows.",
|
|
390
|
+
needsColFields: "Needs two or more fields in Columns.",
|
|
391
|
+
expandNothing: "Nothing is collapsed.",
|
|
392
|
+
collapseNeedsRows: "Needs two or more fields in Rows.",
|
|
393
|
+
collapseAllDone: "Every group is collapsed already.",
|
|
394
|
+
groupsCollapsed: { one: "{count} group collapsed", other: "{count} groups collapsed" },
|
|
395
|
+
groupsExpanded: { one: "{count} group expanded", other: "{count} groups expanded" },
|
|
396
|
+
// the chart type menu: how the chart is drawn
|
|
397
|
+
chartDisplay: "Display",
|
|
398
|
+
// what sharing and the exports said (share-actions.js, export-run.js)
|
|
399
|
+
toastExported: "Exported {file}",
|
|
400
|
+
toastLinkCopied: "Link copied",
|
|
401
|
+
toastJsonCopied: "View copied as JSON",
|
|
402
|
+
toastCopyFailed: "This page does not allow copying. Use \u201CDownload view\u201D instead.",
|
|
403
|
+
toastLinkTooLong: "This view is too large for a link. Use \u201CDownload view\u201D instead."
|
|
404
|
+
};
|
|
405
|
+
var LOADED = /* @__PURE__ */ new Map([["en", en]]);
|
|
406
|
+
function addMenuTexts(lang, texts) {
|
|
407
|
+
LOADED.set(lang, texts);
|
|
408
|
+
}
|
|
409
|
+
var hasMenuTexts = (lang) => LOADED.has(lang);
|
|
410
|
+
var done = /* @__PURE__ */ new WeakMap();
|
|
411
|
+
function menuLabels(labels) {
|
|
412
|
+
const base = LOADED.get(labels.lang) ?? en;
|
|
413
|
+
const known = done.get(labels);
|
|
414
|
+
if (known && known.base === base) {
|
|
415
|
+
return known.out;
|
|
416
|
+
}
|
|
417
|
+
const out = (
|
|
418
|
+
/** @type {import("./labels.js").UiLabels} */
|
|
419
|
+
{ ...labels, ...mergeLabels(
|
|
420
|
+
base,
|
|
421
|
+
/** @type {any} */
|
|
422
|
+
labels[MENU_TEXTS]
|
|
423
|
+
) }
|
|
424
|
+
);
|
|
425
|
+
done.set(labels, { base, out });
|
|
426
|
+
return out;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export {
|
|
430
|
+
en,
|
|
431
|
+
addMenuTexts,
|
|
432
|
+
hasMenuTexts,
|
|
433
|
+
menuLabels
|
|
434
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// src/unused-texts.js
|
|
2
|
+
var en = {
|
|
3
|
+
// "Quakes: the colour scale needs two or three colours - the default colours are used"
|
|
4
|
+
item: "{subject}: {text}",
|
|
5
|
+
// a key of the view this version does not know, as the subject
|
|
6
|
+
quote: "\u201C{key}\u201D",
|
|
7
|
+
// two lines about different entries with the same name: which one ({part}: the zone or section)
|
|
8
|
+
position: "{subject} (no. {n} in {part})",
|
|
9
|
+
// what an issue is about when no field or value is named
|
|
10
|
+
view: "The view",
|
|
11
|
+
sections: {
|
|
12
|
+
sort: "Sorting",
|
|
13
|
+
derived: "Groupings",
|
|
14
|
+
totals: "Totals",
|
|
15
|
+
collapsed: "Collapsed groups",
|
|
16
|
+
display: "Table or chart",
|
|
17
|
+
chart: "Chart",
|
|
18
|
+
formatting: "Formatting"
|
|
19
|
+
},
|
|
20
|
+
// the setting of an unknown choice ({setting}), by the last part of its path
|
|
21
|
+
settings: {
|
|
22
|
+
display: "display",
|
|
23
|
+
type: "chart type",
|
|
24
|
+
valueLabels: "value labels",
|
|
25
|
+
legend: "legend position",
|
|
26
|
+
axisLabels: "axis labels",
|
|
27
|
+
groupLabels: "group labels",
|
|
28
|
+
labelPosition: "label position",
|
|
29
|
+
other: "setting"
|
|
30
|
+
},
|
|
31
|
+
// what the report does instead, by the part of the view ({dropped} in a text)
|
|
32
|
+
dropped: {
|
|
33
|
+
rows: "it is left out of Rows",
|
|
34
|
+
cols: "it is left out of Columns",
|
|
35
|
+
values: "this value is left out",
|
|
36
|
+
filters: "this filter is left out",
|
|
37
|
+
sort: "the usual order is used",
|
|
38
|
+
derived: "this grouping is left out",
|
|
39
|
+
other: "it is left out"
|
|
40
|
+
},
|
|
41
|
+
codes: {
|
|
42
|
+
notView: "this is not a pivotkit view - the report starts empty",
|
|
43
|
+
notJson: "this is not valid JSON - the report starts empty",
|
|
44
|
+
tooLarge: "the view is too large - the report starts empty",
|
|
45
|
+
badVersion: "the view has an unknown version - the report starts empty",
|
|
46
|
+
newerVersion: "the view comes from a newer pivotkit - the report starts empty; update pivotkit to open it",
|
|
47
|
+
noMigration: "the view cannot be brought to this version - the report starts empty",
|
|
48
|
+
unknownKey: "this setting is unknown here - it is ignored",
|
|
49
|
+
notList: "this is not a list - nothing of it is used",
|
|
50
|
+
tooMany: "more than {max} entries - only the first {max} are used",
|
|
51
|
+
tooManyItems: "more than {max} items - only the first {max} are used",
|
|
52
|
+
itemType: "the item \u201C{value}\u201D does not fit a {type} field - it is left out",
|
|
53
|
+
unknownField: "the data has no field \u201C{field}\u201D - {dropped}",
|
|
54
|
+
// the same, when the line is about that field itself (Rows, Columns, a filter or a sort)
|
|
55
|
+
unknownFieldHere: "the data has no field of this name - {dropped}",
|
|
56
|
+
placedTwice: "the field is in Rows or Columns twice - only its first place is used",
|
|
57
|
+
groupingNoName: "the grouping has no name - it is left out",
|
|
58
|
+
groupingNameTaken: "the data already has a field of this name - the grouping is left out",
|
|
59
|
+
groupingNoSource: "the data has no field \u201C{field}\u201D to group - the grouping is left out",
|
|
60
|
+
groupingUnknown: "the grouping \u201C{value}\u201D is unknown - it is left out",
|
|
61
|
+
binsNeedNumber: "ranges need a number field, \u201C{field}\u201D is not one - the grouping is left out",
|
|
62
|
+
groupingNeedsDate: "a date grouping needs a date field, \u201C{field}\u201D is not one - the grouping is left out",
|
|
63
|
+
binSize: "ranges need a size above zero - the grouping is left out",
|
|
64
|
+
notValueRef: "this is not a value - {dropped}",
|
|
65
|
+
unknownAggregator: "the calculation \u201C{value}\u201D is unknown - {dropped}",
|
|
66
|
+
aggregatorNeedsField: "{agg} needs a field - {dropped}",
|
|
67
|
+
aggregatorType: "{agg} does not work on \u201C{field}\u201D ({type}) - {dropped}",
|
|
68
|
+
unknownFormat: "the number format \u201C{value}\u201D is unknown - the usual format is used",
|
|
69
|
+
badLabel: "the name is empty or longer than {max} characters - the usual name is used",
|
|
70
|
+
unknownShowAs: "\u201CShow as\u201D \u201C{value}\u201D is unknown - the plain value is shown",
|
|
71
|
+
showAsNotAdditive: "this \u201CShow as\u201D needs a sum or a count, not {agg} - the plain value is shown",
|
|
72
|
+
showAsNotNumber: "{agg} gives no number to show as a share - the plain value is shown",
|
|
73
|
+
unknownConditional: "the colour format \u201C{value}\u201D is unknown - the value is shown without colours",
|
|
74
|
+
conditionalNotNumber: "colours need a number value - the value is shown without colours",
|
|
75
|
+
colorScaleColors: "the colour scale needs two or three colours - the default colours are used",
|
|
76
|
+
dataBarColor: "the bar colour is not a colour - the default colour is used",
|
|
77
|
+
unknownFilterType: "the filter type \u201C{value}\u201D is unknown - this filter is left out",
|
|
78
|
+
filterNoItems: "the filter lists no items - it is left out",
|
|
79
|
+
filterLabelOp: "the text condition \u201C{value}\u201D is unknown - this filter is left out",
|
|
80
|
+
filterText: "the text condition has no text - this filter is left out",
|
|
81
|
+
filterNotNumber: "{agg} gives no number to filter by - this filter is left out",
|
|
82
|
+
filterCount: "Top needs a whole number from 1 to {max} - this filter is left out",
|
|
83
|
+
filterValue: "the condition needs a comparison and a number - this filter is left out",
|
|
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",
|
|
91
|
+
sortNoItems: "the custom order lists no items - the usual order is used",
|
|
92
|
+
sortedTwice: "the field is sorted twice - only its first sort is used",
|
|
93
|
+
badTotals: "the totals cannot be read - the usual totals are shown",
|
|
94
|
+
collapsedPath: "a collapsed group does not fit the fields - it is shown expanded",
|
|
95
|
+
unknownSetting: "the {setting} \u201C{value}\u201D is unknown - the default is used",
|
|
96
|
+
badTitle: "the title is empty or longer than {max} characters - the chart has no title",
|
|
97
|
+
unknownLocale: "the language \u201C{value}\u201D is unknown - the report's language is used",
|
|
98
|
+
unknownTimeZone: "the time zone \u201C{value}\u201D is unknown - the data's time zone is used",
|
|
99
|
+
timeZoneMismatch: "the view was made for the time zone {value}, the data is in {zone} - times are read in {zone}"
|
|
100
|
+
},
|
|
101
|
+
// a problem this version has no text for (a newer pivotkit-core)
|
|
102
|
+
other: "this part could not be used - it is left out"
|
|
103
|
+
};
|
|
104
|
+
var isObject = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
105
|
+
var own = (obj, key) => isObject(obj) && Object.hasOwn(obj, key) ? obj[key] : void 0;
|
|
106
|
+
var text = (v) => typeof v === "string" && v.trim() !== "" ? v.trim() : null;
|
|
107
|
+
var ENTRY = /^(rows|cols|values|filters|sort|derived)\[(\d+)\]/;
|
|
108
|
+
function valueName(entry, ctx) {
|
|
109
|
+
const label = text(own(entry, "label"));
|
|
110
|
+
if (label) {
|
|
111
|
+
return label;
|
|
112
|
+
}
|
|
113
|
+
const agg = own(entry, "agg");
|
|
114
|
+
if (typeof agg !== "string") {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
const field = own(entry, "field");
|
|
118
|
+
return ctx.value({ field: typeof field === "string" ? field : null, agg, label: null, showAs: null });
|
|
119
|
+
}
|
|
120
|
+
function subjectOf(issue, raw, texts, ctx) {
|
|
121
|
+
if (issue.code === "unknownKey") {
|
|
122
|
+
return ctx.fill(texts.quote, { key: issue.path });
|
|
123
|
+
}
|
|
124
|
+
const m = ENTRY.exec(issue.path);
|
|
125
|
+
if (m) {
|
|
126
|
+
const list = own(raw, m[1]);
|
|
127
|
+
const entry = Array.isArray(list) ? list[Number(m[2])] : void 0;
|
|
128
|
+
const name = m[1] === "values" ? valueName(entry, ctx) : text(m[1] === "rows" || m[1] === "cols" ? entry : m[1] === "derived" ? own(entry, "name") : own(entry, "field"));
|
|
129
|
+
if (name) {
|
|
130
|
+
return m[1] === "values" || m[1] === "derived" ? name : ctx.field(name);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const head = /^[a-z]*/i.exec(issue.path)?.[0] ?? "";
|
|
134
|
+
return own(ctx.labels.zones, head) ?? own(texts.sections, head) ?? texts.view;
|
|
135
|
+
}
|
|
136
|
+
function unusedItem(issue, raw, texts, ctx) {
|
|
137
|
+
const { labels, fill } = ctx;
|
|
138
|
+
const head = /^[a-z]*/i.exec(issue.path)?.[0] ?? "";
|
|
139
|
+
const code = typeof issue.code === "string" ? issue.code : "";
|
|
140
|
+
const key = code === "unknownField" && /^(rows|cols|filters|sort)\[\d+\]$/.test(issue.path) ? "unknownFieldHere" : code;
|
|
141
|
+
const template = code ? own(texts.codes, key) ?? texts.other : "{message}";
|
|
142
|
+
const params = (
|
|
143
|
+
/** @type {import("pivotkit-core").IssueParams} */
|
|
144
|
+
isObject(issue.params) ? issue.params : {}
|
|
145
|
+
);
|
|
146
|
+
const core = labels.core;
|
|
147
|
+
const values = {
|
|
148
|
+
dropped: own(texts.dropped, head) ?? texts.dropped.other,
|
|
149
|
+
setting: own(texts.settings, issue.path.split(".").pop() ?? "") ?? texts.settings.other,
|
|
150
|
+
field: typeof params.field === "string" ? ctx.field(params.field) : "",
|
|
151
|
+
value: params.value ?? "",
|
|
152
|
+
agg: typeof params.agg === "string" ? own(core.aggregators, params.agg) ?? params.agg : "",
|
|
153
|
+
type: typeof params.type === "string" ? own(labels.types, params.type) ?? params.type : "",
|
|
154
|
+
max: typeof params.max === "number" ? params.max.toLocaleString(labels.lang) : "",
|
|
155
|
+
zone: params.zone ?? "",
|
|
156
|
+
message: issue.message
|
|
157
|
+
};
|
|
158
|
+
const [before, after = ""] = texts.item.split("{subject}");
|
|
159
|
+
const line = { text: fill(template, values) };
|
|
160
|
+
return { pre: fill(before, line), subject: subjectOf(issue, raw, texts, ctx), post: fill(after, line) };
|
|
161
|
+
}
|
|
162
|
+
function unusedItems(notes, texts, ctx) {
|
|
163
|
+
const items = notes.map((n) => ({ ...unusedItem(n.issue, n.raw, texts, ctx), at: ENTRY.exec(n.issue.path) }));
|
|
164
|
+
const entries = /* @__PURE__ */ new Map();
|
|
165
|
+
for (const it of items) {
|
|
166
|
+
const set = entries.get(it.subject) ?? /* @__PURE__ */ new Set();
|
|
167
|
+
set.add(it.at ? it.at[0] : "");
|
|
168
|
+
entries.set(it.subject, set);
|
|
169
|
+
}
|
|
170
|
+
return items.map(({ at, ...it }) => {
|
|
171
|
+
if (!at || entries.get(it.subject).size < 2) {
|
|
172
|
+
return it;
|
|
173
|
+
}
|
|
174
|
+
const part = own(ctx.labels.zones, at[1]) ?? own(texts.sections, at[1]) ?? at[1];
|
|
175
|
+
return { ...it, subject: ctx.fill(texts.position, { subject: it.subject, n: Number(at[2]) + 1, part }) };
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export {
|
|
180
|
+
en,
|
|
181
|
+
unusedItem,
|
|
182
|
+
unusedItems
|
|
183
|
+
};
|