@olvnck/ingrid 0.0.0-stage → 0.15.20
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 +7 -0
- package/LICENSE +21 -0
- package/README.md +5533 -2
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/dist/engine/clipboard/copy.d.ts +40 -0
- package/dist/engine/clipboard/options.d.ts +16 -0
- package/dist/engine/clipboard/text.d.ts +32 -0
- package/dist/engine/columns/autosize.d.ts +43 -0
- package/dist/engine/columns/dataType.d.ts +30 -0
- package/dist/engine/columns/fold.d.ts +48 -0
- package/dist/engine/columns/layout.d.ts +150 -0
- package/dist/engine/columns/model.d.ts +369 -0
- package/dist/engine/columns/query.d.ts +16 -0
- package/dist/engine/columns/tooltips.d.ts +27 -0
- package/dist/engine/data/client/clientSource.d.ts +151 -0
- package/dist/engine/data/client/columnFilters.d.ts +106 -0
- package/dist/engine/data/client/descendants.d.ts +35 -0
- package/dist/engine/data/client/diff.d.ts +23 -0
- package/dist/engine/data/client/fields.d.ts +70 -0
- package/dist/engine/data/client/filter.d.ts +95 -0
- package/dist/engine/data/client/flatten.d.ts +141 -0
- package/dist/engine/data/client/groupSize.d.ts +14 -0
- package/dist/engine/data/client/hierarchy.d.ts +85 -0
- package/dist/engine/data/client/order.d.ts +32 -0
- package/dist/engine/data/client/pipeline.d.ts +277 -0
- package/dist/engine/data/client/remap.d.ts +33 -0
- package/dist/engine/data/client/trees.d.ts +41 -0
- package/dist/engine/data/client/types.d.ts +173 -0
- package/dist/engine/data/memory/generate.d.ts +36 -0
- package/dist/engine/data/memory/memoryDatasource.d.ts +46 -0
- package/dist/engine/data/rowKey.d.ts +15 -0
- package/dist/engine/data/server/contract.d.ts +64 -0
- package/dist/engine/data/server/expansion.d.ts +35 -0
- package/dist/engine/data/server/levelStore.d.ts +99 -0
- package/dist/engine/data/server/loader.d.ts +128 -0
- package/dist/engine/data/server/reader.d.ts +88 -0
- package/dist/engine/data/server/response.d.ts +31 -0
- package/dist/engine/data/server/serverSource.d.ts +130 -0
- package/dist/engine/data/shared/aggregate.d.ts +12 -0
- package/dist/engine/data/shared/columnFilter.d.ts +19 -0
- package/dist/engine/data/shared/compare.d.ts +12 -0
- package/dist/engine/data/shared/dateParts.d.ts +19 -0
- package/dist/engine/data/shared/distinct.d.ts +30 -0
- package/dist/engine/data/shared/filterRecord.d.ts +7 -0
- package/dist/engine/data/shared/keys.d.ts +17 -0
- package/dist/engine/data/shared/quickFilter.d.ts +17 -0
- package/dist/engine/data/shared/sourceUtils.d.ts +11 -0
- package/dist/engine/data/shared/splice.d.ts +9 -0
- package/dist/engine/detail/builds.d.ts +26 -0
- package/dist/engine/detail/content.d.ts +24 -0
- package/dist/engine/detail/controller.d.ts +176 -0
- package/dist/engine/detail/events.d.ts +11 -0
- package/dist/engine/detail/follow.d.ts +56 -0
- package/dist/engine/detail/layer.d.ts +119 -0
- package/dist/engine/detail/live.d.ts +96 -0
- package/dist/engine/detail/options.d.ts +53 -0
- package/dist/engine/detail/state.d.ts +140 -0
- package/dist/engine/edit/clear.d.ts +20 -0
- package/dist/engine/edit/editing.d.ts +4 -0
- package/dist/engine/edit/editors/date.d.ts +3 -0
- package/dist/engine/edit/editors/index.d.ts +23 -0
- package/dist/engine/edit/editors/internals.d.ts +25 -0
- package/dist/engine/edit/editors/largeText.d.ts +2 -0
- package/dist/engine/edit/editors/number.d.ts +4 -0
- package/dist/engine/edit/editors/select.d.ts +2 -0
- package/dist/engine/edit/editors/text.d.ts +15 -0
- package/dist/engine/edit/fill.d.ts +47 -0
- package/dist/engine/edit/fillHandle.d.ts +66 -0
- package/dist/engine/edit/fillValues.d.ts +15 -0
- package/dist/engine/edit/operations.d.ts +68 -0
- package/dist/engine/edit/paste.d.ts +23 -0
- package/dist/engine/edit/pastePlan.d.ts +17 -0
- package/dist/engine/edit/popupHost.d.ts +63 -0
- package/dist/engine/edit/session.d.ts +52 -0
- package/dist/engine/edit/types.d.ts +234 -0
- package/dist/engine/edit/undo.d.ts +38 -0
- package/dist/engine/edit/validation.d.ts +10 -0
- package/dist/engine/edit/values.d.ts +38 -0
- package/dist/engine/export/columns.d.ts +19 -0
- package/dist/engine/export/deliver.d.ts +47 -0
- package/dist/engine/export/dsv.d.ts +2 -0
- package/dist/engine/export/expanded.d.ts +69 -0
- package/dist/engine/export/export.d.ts +25 -0
- package/dist/engine/export/headers.d.ts +15 -0
- package/dist/engine/export/options.d.ts +19 -0
- package/dist/engine/export/plan.d.ts +43 -0
- package/dist/engine/export/values.d.ts +33 -0
- package/dist/engine/export/walk.d.ts +31 -0
- package/dist/engine/export/writer.d.ts +62 -0
- package/dist/engine/export/xlsx/cells.d.ts +31 -0
- package/dist/engine/export/xlsx/index.d.ts +12 -0
- package/dist/engine/export/xlsx/parts.d.ts +36 -0
- package/dist/engine/export/xlsx/sheet.d.ts +30 -0
- package/dist/engine/export/xlsx/styles.d.ts +15 -0
- package/dist/engine/export/xlsx/table.d.ts +8 -0
- package/dist/engine/export/xlsx/zip.d.ts +24 -0
- package/dist/engine/filter/groupFilter.d.ts +28 -0
- package/dist/engine/filter/model.d.ts +235 -0
- package/dist/engine/filter/shorthand.d.ts +36 -0
- package/dist/engine/filter/state.d.ts +76 -0
- package/dist/engine/filter/summary.d.ts +16 -0
- package/dist/engine/filter/values.d.ts +40 -0
- package/dist/engine/find/index.d.ts +94 -0
- package/dist/engine/find/match.d.ts +38 -0
- package/dist/engine/find/model.d.ts +115 -0
- package/dist/engine/grid.d.ts +42 -0
- package/dist/engine/i18n/numbers.d.ts +34 -0
- package/dist/engine/i18n/texts.d.ts +306 -0
- package/dist/engine/interact/autoScroll.d.ts +11 -0
- package/dist/engine/interact/body.d.ts +41 -0
- package/dist/engine/interact/focus.d.ts +158 -0
- package/dist/engine/interact/header.d.ts +216 -0
- package/dist/engine/interact/host.d.ts +400 -0
- package/dist/engine/interact/keyboard.d.ts +20 -0
- package/dist/engine/interact/menuKey.d.ts +7 -0
- package/dist/engine/interact/own.d.ts +2 -0
- package/dist/engine/interact/ranges.d.ts +68 -0
- package/dist/engine/interact/rowSelection.d.ts +53 -0
- package/dist/engine/interact/shortcut.d.ts +21 -0
- package/dist/engine/interact/tooltips.d.ts +63 -0
- package/dist/engine/measure.d.ts +30 -0
- package/dist/engine/render/cells.d.ts +322 -0
- package/dist/engine/render/columns.d.ts +28 -0
- package/dist/engine/render/dom.d.ts +24 -0
- package/dist/engine/render/flash.d.ts +74 -0
- package/dist/engine/render/groupCell.d.ts +50 -0
- package/dist/engine/render/groupPanel.d.ts +21 -0
- package/dist/engine/render/header.d.ts +162 -0
- package/dist/engine/render/overlay.d.ts +15 -0
- package/dist/engine/render/pinnedRows.d.ts +106 -0
- package/dist/engine/render/rowPool.d.ts +3 -0
- package/dist/engine/render/scrollbars.d.ts +77 -0
- package/dist/engine/render/strategy.d.ts +397 -0
- package/dist/engine/reportError.d.ts +7 -0
- package/dist/engine/rowdrag/controller.d.ts +80 -0
- package/dist/engine/rowdrag/events.d.ts +17 -0
- package/dist/engine/rowdrag/gesture.d.ts +33 -0
- package/dist/engine/rowdrag/keys.d.ts +21 -0
- package/dist/engine/rowdrag/model.d.ts +67 -0
- package/dist/engine/rowdrag/options.d.ts +34 -0
- package/dist/engine/rowdrag/rows.d.ts +61 -0
- package/dist/engine/rowdrag/target.d.ts +59 -0
- package/dist/engine/rowdrag/zones.d.ts +79 -0
- package/dist/engine/schedule.d.ts +29 -0
- package/dist/engine/selection/aggregate.d.ts +30 -0
- package/dist/engine/selection/options.d.ts +7 -0
- package/dist/engine/selection/rangeRows.d.ts +19 -0
- package/dist/engine/selection/ranges.d.ts +114 -0
- package/dist/engine/selection/rows.d.ts +207 -0
- package/dist/engine/source.d.ts +225 -0
- package/dist/engine/synthetic.d.ts +28 -0
- package/dist/engine/table/cells.d.ts +52 -0
- package/dist/engine/table/headers.d.ts +20 -0
- package/dist/engine/table/host.d.ts +65 -0
- package/dist/engine/table/job.d.ts +21 -0
- package/dist/engine/table/rows.d.ts +99 -0
- package/dist/engine/table/slicer.d.ts +54 -0
- package/dist/engine/table/takes.d.ts +145 -0
- package/dist/engine/types.d.ts +2950 -0
- package/dist/engine/ui/announce.d.ts +7 -0
- package/dist/engine/ui/chooser.d.ts +19 -0
- package/dist/engine/ui/columnList.d.ts +41 -0
- package/dist/engine/ui/columnMenu.d.ts +96 -0
- package/dist/engine/ui/columnsPanel.d.ts +16 -0
- package/dist/engine/ui/contextMenu.d.ts +48 -0
- package/dist/engine/ui/controller.d.ts +295 -0
- package/dist/engine/ui/filters/apply.d.ts +53 -0
- package/dist/engine/ui/filters/custom.d.ts +3 -0
- package/dist/engine/ui/filters/date.d.ts +12 -0
- package/dist/engine/ui/filters/host.d.ts +102 -0
- package/dist/engine/ui/filters/multi.d.ts +6 -0
- package/dist/engine/ui/filters/number.d.ts +15 -0
- package/dist/engine/ui/filters/numberMask.d.ts +15 -0
- package/dist/engine/ui/filters/set.d.ts +3 -0
- package/dist/engine/ui/filters/simple.d.ts +52 -0
- package/dist/engine/ui/filters/text.d.ts +5 -0
- package/dist/engine/ui/filtersPanel.d.ts +18 -0
- package/dist/engine/ui/floating.d.ts +66 -0
- package/dist/engine/ui/floatingShorthand.d.ts +20 -0
- package/dist/engine/ui/floatingTypes.d.ts +82 -0
- package/dist/engine/ui/icons.d.ts +25 -0
- package/dist/engine/ui/menu.d.ts +45 -0
- package/dist/engine/ui/overlayHost.d.ts +7 -0
- package/dist/engine/ui/place.d.ts +37 -0
- package/dist/engine/ui/popup.d.ts +97 -0
- package/dist/engine/ui/sideBar.d.ts +26 -0
- package/dist/engine/ui/statusBar.d.ts +29 -0
- package/dist/engine/ui/toolbar/buttons.d.ts +21 -0
- package/dist/engine/ui/toolbar/chipState.d.ts +52 -0
- package/dist/engine/ui/toolbar/chips.d.ts +23 -0
- package/dist/engine/ui/toolbar/findBox.d.ts +10 -0
- package/dist/engine/ui/toolbar/quickFilterBox.d.ts +12 -0
- package/dist/engine/ui/toolbar/registry.d.ts +5 -0
- package/dist/engine/ui/toolbar/toolbar.d.ts +31 -0
- package/dist/engine/ui/toolbar/types.d.ts +23 -0
- package/dist/engine/ui/tooltip.d.ts +34 -0
- package/dist/engine/ui/virtualList.d.ts +35 -0
- package/dist/engine/viewport/heightView.d.ts +62 -0
- package/dist/engine/viewport/heights.d.ts +39 -0
- package/dist/engine/viewport/intervals.d.ts +19 -0
- package/dist/engine/viewport/range.d.ts +51 -0
- package/dist/engine/viewport/scroll.d.ts +45 -0
- package/dist/engine/viewport/stack.d.ts +160 -0
- package/dist/grid-C34VEap6.js +32310 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1273 -0
- package/dist/ingrid.css +1 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.js +1 -0
- package/dist/locale/de.d.ts +4 -0
- package/dist/locale/de.js +222 -0
- package/dist/themes/primevue.css +63 -0
- package/dist/themes/tailwind.css +68 -0
- package/dist/vue/InGrid.vue.d.ts +263 -0
- package/dist/vue/stableOptions.d.ts +8 -0
- package/dist/vue/useClientSource.d.ts +28 -0
- package/dist/vue/useServerSource.d.ts +8 -0
- package/dist/vue/vueRenderer.d.ts +164 -0
- package/dist/xlsx-59umS_n_.js +325 -0
- package/package.json +78 -5
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { type NumberStyle, type NumberStyles, type ResolvedNumbers } from './numbers';
|
|
2
|
+
export interface GridTexts {
|
|
3
|
+
groupHeader: string;
|
|
4
|
+
/** A group cell's blank key. */
|
|
5
|
+
blankGroup: string;
|
|
6
|
+
/**
|
|
7
|
+
* A group's total row in the group column, "Total <label>" — `label` the group's shown label (its
|
|
8
|
+
* level's `format`, "(Blank)"), without a count.
|
|
9
|
+
*/
|
|
10
|
+
groupTotal: (label: string) => string;
|
|
11
|
+
/** The grand total row's label — in the group column, on a flat grid in its label column. */
|
|
12
|
+
grandTotal: string;
|
|
13
|
+
/** A date part column's header is "<header> (<part>)". */
|
|
14
|
+
datePartYear: string;
|
|
15
|
+
datePartQuarter: string;
|
|
16
|
+
datePartMonth: string;
|
|
17
|
+
datePartDay: string;
|
|
18
|
+
datePartHour: string;
|
|
19
|
+
datePartMinute: string;
|
|
20
|
+
datePartSecond: string;
|
|
21
|
+
panelHint: string;
|
|
22
|
+
panelLabel: string;
|
|
23
|
+
loadError: string;
|
|
24
|
+
chipLabel: (name: string) => string;
|
|
25
|
+
chipRemove: (name: string) => string;
|
|
26
|
+
textFilter: string;
|
|
27
|
+
numberFilter: string;
|
|
28
|
+
dateFilter: string;
|
|
29
|
+
setFilter: string;
|
|
30
|
+
opContains: string;
|
|
31
|
+
opNotContains: string;
|
|
32
|
+
opEquals: string;
|
|
33
|
+
opNotEqual: string;
|
|
34
|
+
opStartsWith: string;
|
|
35
|
+
opEndsWith: string;
|
|
36
|
+
opBlank: string;
|
|
37
|
+
opNotBlank: string;
|
|
38
|
+
opGreaterThan: string;
|
|
39
|
+
opGreaterThanOrEqual: string;
|
|
40
|
+
opLessThan: string;
|
|
41
|
+
opLessThanOrEqual: string;
|
|
42
|
+
opInRange: string;
|
|
43
|
+
opBefore: string;
|
|
44
|
+
opAfter: string;
|
|
45
|
+
and: string;
|
|
46
|
+
or: string;
|
|
47
|
+
apply: string;
|
|
48
|
+
clear: string;
|
|
49
|
+
reset: string;
|
|
50
|
+
cancel: string;
|
|
51
|
+
filterPlaceholder: string;
|
|
52
|
+
/** A one-input condition's accessible name (a range's inputs are named by rangeFrom / rangeTo). */
|
|
53
|
+
filterValue: string;
|
|
54
|
+
rangeFrom: string;
|
|
55
|
+
rangeTo: string;
|
|
56
|
+
rangeInvalid: string;
|
|
57
|
+
datePlaceholder: string;
|
|
58
|
+
dateTimePlaceholder: string;
|
|
59
|
+
/** The operator select's accessible name. */
|
|
60
|
+
operatorLabel: string;
|
|
61
|
+
joinLabel: string;
|
|
62
|
+
sumContains: string;
|
|
63
|
+
sumNotContains: string;
|
|
64
|
+
sumEquals: string;
|
|
65
|
+
sumNotEqual: string;
|
|
66
|
+
sumStartsWith: string;
|
|
67
|
+
sumEndsWith: string;
|
|
68
|
+
sumBlank: string;
|
|
69
|
+
sumNotBlank: string;
|
|
70
|
+
sumGreaterThan: string;
|
|
71
|
+
sumGreaterThanOrEqual: string;
|
|
72
|
+
sumLessThan: string;
|
|
73
|
+
sumLessThanOrEqual: string;
|
|
74
|
+
sumBefore: string;
|
|
75
|
+
sumAfter: string;
|
|
76
|
+
sumSet: (count: number, formatted: string, labels: string) => string;
|
|
77
|
+
selectAll: string;
|
|
78
|
+
selectAllSearchResults: string;
|
|
79
|
+
blanks: string;
|
|
80
|
+
searchPlaceholder: string;
|
|
81
|
+
noMatches: string;
|
|
82
|
+
loading: string;
|
|
83
|
+
incompleteList: string;
|
|
84
|
+
valuesError: string;
|
|
85
|
+
true: string;
|
|
86
|
+
false: string;
|
|
87
|
+
valuesLabel: string;
|
|
88
|
+
menuButton: (name: string) => string;
|
|
89
|
+
filterButton: (name: string) => string;
|
|
90
|
+
filterActive: string;
|
|
91
|
+
filtered: string;
|
|
92
|
+
floatingInput: (name: string) => string;
|
|
93
|
+
floatingClear: (name: string) => string;
|
|
94
|
+
/** The number shorthand box's hint, its placeholder. */
|
|
95
|
+
numberShorthandHint: string;
|
|
96
|
+
/** What the number shorthand box accepts, its description. */
|
|
97
|
+
numberShorthandHelp: string;
|
|
98
|
+
/** The group column's group-size box's hint, its placeholder. */
|
|
99
|
+
groupSizeHint: string;
|
|
100
|
+
/** What the group-size box accepts, its description. */
|
|
101
|
+
groupSizeHelp: string;
|
|
102
|
+
/** The group-size box's label beside a grouped-column filter. */
|
|
103
|
+
groupSizeLabel: string;
|
|
104
|
+
/** The same with two or more grouping levels: the innermost grouped column it counts. */
|
|
105
|
+
groupSizeLevel: (column: string) => string;
|
|
106
|
+
/** The group column's picker of the grouped column whose filter shows. */
|
|
107
|
+
groupFilterPicker: string;
|
|
108
|
+
columnMenu: string;
|
|
109
|
+
contextMenu: string;
|
|
110
|
+
sortAsc: string;
|
|
111
|
+
sortDesc: string;
|
|
112
|
+
sortClear: string;
|
|
113
|
+
/** The Columns panel's sort markers: the direction and the priority among several sorts. */
|
|
114
|
+
sortStateAscending: string;
|
|
115
|
+
sortStateDescending: string;
|
|
116
|
+
sortStatePriority: (n: number) => string;
|
|
117
|
+
filterItem: string;
|
|
118
|
+
pin: string;
|
|
119
|
+
pinLeft: string;
|
|
120
|
+
pinRight: string;
|
|
121
|
+
unpin: string;
|
|
122
|
+
aggregate: string;
|
|
123
|
+
aggregateNone: string;
|
|
124
|
+
aggSum: string;
|
|
125
|
+
aggAvg: string;
|
|
126
|
+
aggMin: string;
|
|
127
|
+
aggMax: string;
|
|
128
|
+
aggCount: string;
|
|
129
|
+
autoSize: string;
|
|
130
|
+
autoSizeAll: string;
|
|
131
|
+
group: (name: string) => string;
|
|
132
|
+
ungroup: (name: string) => string;
|
|
133
|
+
chooseColumns: string;
|
|
134
|
+
resetColumns: string;
|
|
135
|
+
expandAll: string;
|
|
136
|
+
collapseAll: string;
|
|
137
|
+
sideBar: string;
|
|
138
|
+
columnsPanel: string;
|
|
139
|
+
filtersPanel: string;
|
|
140
|
+
searchColumns: string;
|
|
141
|
+
searchFilters: string;
|
|
142
|
+
toggleAllColumns: string;
|
|
143
|
+
expandAllList: string;
|
|
144
|
+
collapseAllList: string;
|
|
145
|
+
rowGroupsSection: string;
|
|
146
|
+
rowGroupsHint: string;
|
|
147
|
+
valuesSection: string;
|
|
148
|
+
valuesHint: string;
|
|
149
|
+
valueChip: (fn: string, name: string) => string;
|
|
150
|
+
removeChip: (label: string) => string;
|
|
151
|
+
resizePanel: string;
|
|
152
|
+
columnMoved: (name: string, position: number, formatted: string) => string;
|
|
153
|
+
totalRows: (count: number, formatted: string) => string;
|
|
154
|
+
/** The top bar. */
|
|
155
|
+
toolbarLabel: string;
|
|
156
|
+
toolbarQuickFilter: string;
|
|
157
|
+
toolbarFind: string;
|
|
158
|
+
toolbarFindCount: (active: number, total: number, activeText: string, totalText: string) => string;
|
|
159
|
+
toolbarFindPrevious: string;
|
|
160
|
+
toolbarFindNext: string;
|
|
161
|
+
toolbarFindClear: string;
|
|
162
|
+
toolbarMenu: string;
|
|
163
|
+
/** The count chips' labels; `formatted` follows the grid's count format. */
|
|
164
|
+
chipFilters: (count: number, formatted: string) => string;
|
|
165
|
+
chipSorts: (count: number, formatted: string) => string;
|
|
166
|
+
chipGroups: (count: number, formatted: string) => string;
|
|
167
|
+
/** Before the group-size filter's summary. */
|
|
168
|
+
chipGroupSize: (summary: string) => string;
|
|
169
|
+
chipHidden: (count: number, formatted: string) => string;
|
|
170
|
+
chipPinned: (count: number, formatted: string) => string;
|
|
171
|
+
chipMoved: string;
|
|
172
|
+
chipFiltersTooltip: string;
|
|
173
|
+
chipSortsTooltip: string;
|
|
174
|
+
chipGroupsTooltip: string;
|
|
175
|
+
chipGroupSizeTooltip: string;
|
|
176
|
+
chipHiddenTooltip: string;
|
|
177
|
+
chipPinnedTooltip: string;
|
|
178
|
+
chipMovedTooltip: string;
|
|
179
|
+
filteredRows: (count: number, formatted: string) => string;
|
|
180
|
+
totalAndFilteredRows: (filtered: number, total: number, filteredText: string, totalText: string) => string;
|
|
181
|
+
rowCount: (count: number, formatted: string) => string;
|
|
182
|
+
/** The grid has no rows (none in the data, or all filtered out). */
|
|
183
|
+
noRows: string;
|
|
184
|
+
/** Every data column is hidden. */
|
|
185
|
+
noColumns: string;
|
|
186
|
+
/** The handle column's cell accessible name. */
|
|
187
|
+
rowDragHandle: string;
|
|
188
|
+
/** The ghost's text for several rows; `count` null: a select-all of unknown size. */
|
|
189
|
+
rowDragRows: (count: number | null, formatted: string) => string;
|
|
190
|
+
/** Live region: a drag began. */
|
|
191
|
+
rowDragStarted: (count: number | null, formatted: string) => string;
|
|
192
|
+
/** Live region: rows moved by a managed reorder. */
|
|
193
|
+
rowsMoved: (count: number, formatted: string) => string;
|
|
194
|
+
/** Live region: rows dropped (not moved by the grid). */
|
|
195
|
+
rowsDropped: (count: number | null, formatted: string) => string;
|
|
196
|
+
/** Live region: a drag was cancelled. */
|
|
197
|
+
rowDragCancelled: string;
|
|
198
|
+
/** Live region after a keyboard move: "Row 12 of 40". */
|
|
199
|
+
rowPosition: (row: number, count: number, formattedRow: string, formattedCount: string) => string;
|
|
200
|
+
/** The toggle column's header and cells, for assistive technology. */
|
|
201
|
+
detailToggleHeader: string;
|
|
202
|
+
/** A detail row's accessible name; `row` is the master's row number, `formatted` it in the number format. */
|
|
203
|
+
detailRowLabel: (row: number, formatted: string) => string;
|
|
204
|
+
/** The built-in detail grid's accessible name. */
|
|
205
|
+
detailGridLabel: (row: number, formatted: string) => string;
|
|
206
|
+
/** The panel of a detail whose content failed to build or load. */
|
|
207
|
+
detailError: string;
|
|
208
|
+
/** Live region after a keyboard toggle. */
|
|
209
|
+
detailShown: string;
|
|
210
|
+
detailHidden: string;
|
|
211
|
+
/** Live region after Alt+Enter. */
|
|
212
|
+
detailsAllShown: string;
|
|
213
|
+
detailsAllHidden: string;
|
|
214
|
+
/** A row checkbox's accessible name. */
|
|
215
|
+
selectRow: string;
|
|
216
|
+
/** The header checkbox's accessible name. */
|
|
217
|
+
selectAllRows: string;
|
|
218
|
+
/** A disabled row checkbox's accessible name. */
|
|
219
|
+
rowNotSelectable: string;
|
|
220
|
+
/**
|
|
221
|
+
* A checkbox column's box, for assistive technology: its state, and on a live box that Space toggles it
|
|
222
|
+
* (English: "Checked", "Unchecked", "Mixed"; live adds ", Space toggles").
|
|
223
|
+
*/
|
|
224
|
+
cellCheckbox: (state: 'checked' | 'unchecked' | 'mixed', live: boolean) => string;
|
|
225
|
+
copy: string;
|
|
226
|
+
/** The Copy item's shortcut as the platform writes it (`mac`: macOS, ⌘C). */
|
|
227
|
+
copyShortcut: (mac: boolean) => string;
|
|
228
|
+
/** The key names in shortcut text of the bound copy keys. */
|
|
229
|
+
keyNames: {
|
|
230
|
+
ctrl: string;
|
|
231
|
+
alt: string;
|
|
232
|
+
shift: string;
|
|
233
|
+
};
|
|
234
|
+
copyWithHeaders: string;
|
|
235
|
+
copyWithGroupHeaders: string;
|
|
236
|
+
/** The Cut item. */
|
|
237
|
+
cut: string;
|
|
238
|
+
/** The Paste item. */
|
|
239
|
+
paste: string;
|
|
240
|
+
/** A cell editor's `aria-label`. */
|
|
241
|
+
editorLabel: (column: string) => string;
|
|
242
|
+
/** Validation texts of the built-in editors. */
|
|
243
|
+
editTooLong: (max: number) => string;
|
|
244
|
+
editBelowMin: (min: number | string) => string;
|
|
245
|
+
editAboveMax: (max: number | string) => string;
|
|
246
|
+
editNotANumber: string;
|
|
247
|
+
editNotADate: string;
|
|
248
|
+
editDateBefore: (date: string) => string;
|
|
249
|
+
editDateAfter: (date: string) => string;
|
|
250
|
+
/** The selected-rows status panel. */
|
|
251
|
+
selectedRows: (count: number, formatted: string) => string;
|
|
252
|
+
/** The selected-rows panel when a server's `all` has an unknown count. */
|
|
253
|
+
allSelected: string;
|
|
254
|
+
/** After the aggregation panel's numbers over a server source: only loaded rows count. */
|
|
255
|
+
aggPartial: string;
|
|
256
|
+
/** One number of the aggregation panel: `label` is `aggCount` … `aggAvg`, `formatted` the number. */
|
|
257
|
+
aggItem: (label: string, formatted: string) => string;
|
|
258
|
+
/** The aggregation panel while a large union is still being computed. */
|
|
259
|
+
aggPending: string;
|
|
260
|
+
/** Live region after keyboard selection gestures. */
|
|
261
|
+
rowsSelected: (count: number, formatted: string) => string;
|
|
262
|
+
/** Live region after a copy. */
|
|
263
|
+
copiedRows: (count: number, formatted: string) => string;
|
|
264
|
+
/** The Export menu item (a sub-menu of the three formats). */
|
|
265
|
+
export: string;
|
|
266
|
+
/** The context menu's Export selection item (the same sub-menu). */
|
|
267
|
+
exportSelection: string;
|
|
268
|
+
exportCsv: string;
|
|
269
|
+
exportTsv: string;
|
|
270
|
+
exportXlsx: string;
|
|
271
|
+
/** Live region after a delivered export. */
|
|
272
|
+
exportedRows: (count: number, formatted: string) => string;
|
|
273
|
+
/** An XLSX file's sheet when the export names none. */
|
|
274
|
+
exportSheetName: string;
|
|
275
|
+
/** An XLSX table's name for a column whose header is empty, before the column's number ("Column3"). */
|
|
276
|
+
exportTableColumn: string;
|
|
277
|
+
/** The row-number column's header in an export. */
|
|
278
|
+
rowNumberHeader: string;
|
|
279
|
+
}
|
|
280
|
+
export declare const enTexts: GridTexts;
|
|
281
|
+
export interface LocaleOptions {
|
|
282
|
+
/** BCP 47 tag for number formatting; default 'en'. */
|
|
283
|
+
lang?: string;
|
|
284
|
+
/** Texts over the English ones. */
|
|
285
|
+
texts?: Partial<GridTexts>;
|
|
286
|
+
/**
|
|
287
|
+
* Number styles: one style for every place, or per place (`all`, `groupCounts`, `statusBar`, `filterInput`).
|
|
288
|
+
* Default 'plain' (`1234`, `.`); 'locale' follows `lang`; any other string is a BCP 47 tag.
|
|
289
|
+
*/
|
|
290
|
+
numbers?: NumberStyle | NumberStyles;
|
|
291
|
+
}
|
|
292
|
+
export interface Locale {
|
|
293
|
+
readonly lang: string;
|
|
294
|
+
readonly texts: GridTexts;
|
|
295
|
+
/** The number formats of every place. */
|
|
296
|
+
readonly numbers: ResolvedNumbers;
|
|
297
|
+
/** `numbers.all.count(n)`: plain by default, grouped by `lang` with `numbers: 'locale'`. */
|
|
298
|
+
count(n: number): string;
|
|
299
|
+
/** `numbers.filterInput.decimal`: the decimal mark the number filter inputs write. */
|
|
300
|
+
readonly decimal: '.' | ',';
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Merges the options over English; the number format is made once per locale. A function text is isolated; a
|
|
304
|
+
* value that is no function where English has one is reported once (per texts object) and the English function used.
|
|
305
|
+
*/
|
|
306
|
+
export declare function resolveLocale(options?: LocaleOptions): Locale;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-scroll starts SCROLL_ZONE px inside the rows area's (for a range drag: the centre lane's) visible edges (a
|
|
3
|
+
* grid that ends at the screen's edge, a pinned lane next to the centre), smaller than a row, so a pointer resting in the
|
|
4
|
+
* last row's upper part does not scroll. Then px per frame for every px the pointer is into that band or past it, up to
|
|
5
|
+
* the distance of the top speed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SCROLL_ZONE = 16;
|
|
8
|
+
/** How far `v` is past [lo, hi] (negative before it), 0 inside. */
|
|
9
|
+
export declare const past: (v: number, lo: number, hi: number) => number;
|
|
10
|
+
/** One frame's auto-scroll for a pointer `d` px past an edge: faster further out. */
|
|
11
|
+
export declare const speed: (d: number) => number;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CellAddress } from '../types';
|
|
2
|
+
import type { FocusModel } from './focus';
|
|
3
|
+
import type { InteractHost } from './host';
|
|
4
|
+
/** The grid runs on macOS. */
|
|
5
|
+
export declare function isMac(): boolean;
|
|
6
|
+
/** Internal, for tests: behave as on macOS (true) or elsewhere (false); null goes back to the detected platform. */
|
|
7
|
+
export declare function setPlatformForTests(mac: boolean | null): void;
|
|
8
|
+
/**
|
|
9
|
+
* A primary press or click with Ctrl and without Cmd on macOS: a context click. It changes neither focus nor the
|
|
10
|
+
* selection beyond what a right-click does, so pointer Mod gestures are Cmd gestures there.
|
|
11
|
+
*/
|
|
12
|
+
export declare function contextClick(e: MouseEvent): boolean;
|
|
13
|
+
/** `t` or an ancestor of it up to `owner` (a cell, a header cell; not included) is interactive content. */
|
|
14
|
+
export declare function interactiveIn(t: Element, owner: Element): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A right-click or macOS context click on the grid's own box inside a range column's cell: a live value box,
|
|
17
|
+
* or a row's box outside the selection column (a group cell's, `checkboxLocation: 'group'`). It is a right-click
|
|
18
|
+
* on that cell: `contextPress` here and the focus model take it as one — not as interactive content — and the
|
|
19
|
+
* focus model prevents it last, after its rules saw it, so the box never takes DOM focus; its value and the row's
|
|
20
|
+
* selection never change. The selection column's box and cell stay the row selection wiring's, which prevents their
|
|
21
|
+
* press for any button (those cells are left to the browser's focus). Only a box in a body cell: the header's box
|
|
22
|
+
* prevents its own press, and an app's element that happens to carry `.ig-checkbox` elsewhere keeps its focus.
|
|
23
|
+
*/
|
|
24
|
+
export declare function cellBoxContext(e: MouseEvent): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* A row-drag grip that can start a drag: not disabled, its grid not locked. It is
|
|
27
|
+
* one of the grid's own controls — its press makes no range and no text selection, and the focus model moves focus as
|
|
28
|
+
* for a checkbox (`focus.ts`) — but unlike `BOXES` its click stays the row's and the cell's. A
|
|
29
|
+
* disabled or locked grip is part of its cell: a press there is an ordinary press.
|
|
30
|
+
*/
|
|
31
|
+
export declare function liveGrip(t: Element, root: Element): Element | null;
|
|
32
|
+
/** A chevron a cell holds: a group chevron or a detail chevron; a spacer is none. */
|
|
33
|
+
export declare const CHEVRON = ".ig-group-toggle:not(.ig-group-spacer), .ig-detail-toggle:not(.ig-detail-spacer)";
|
|
34
|
+
export interface BodyPointer {
|
|
35
|
+
/** `textSelection`: cells take part in the browser's text selection; pointer drags then make no range. */
|
|
36
|
+
setTextSelection(on: boolean): void;
|
|
37
|
+
destroy(): void;
|
|
38
|
+
}
|
|
39
|
+
/** The same cell: a pinned row's is not the body row with the same index. */
|
|
40
|
+
export declare const sameCell: (a: CellAddress, b: CellAddress) => boolean;
|
|
41
|
+
export declare function createBodyPointer(host: InteractHost, focus: FocusModel): BodyPointer;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { DisplayLayout, ResolvedColumn } from '../columns/layout';
|
|
2
|
+
import type { EditTarget } from '../edit/types';
|
|
3
|
+
import type { SectionSide } from '../render/pinnedRows';
|
|
4
|
+
import type { FocusDraw } from '../render/strategy';
|
|
5
|
+
import type { CellAddress, FocusChange, ScrollAlign } from '../types';
|
|
6
|
+
import type { InteractHost } from './host';
|
|
7
|
+
/**
|
|
8
|
+
* The logical focus position. `level` is the header row: group rows from 0, then the leaf and floating rows.
|
|
9
|
+
* A detail stop is master `row`'s open detail; `column` is the column focus had before it, fixed like a
|
|
10
|
+
* cell's, where ↑ / ↓ go on. A cell with `pinned` is a pinned row's, `row` its index in that section;
|
|
11
|
+
* without it a body cell, whose index keeps its meaning (the body's data fix-ups never move a pinned one).
|
|
12
|
+
*/
|
|
13
|
+
export type FocusPosition = {
|
|
14
|
+
kind: 'cell';
|
|
15
|
+
row: number;
|
|
16
|
+
column: string;
|
|
17
|
+
pinned?: SectionSide;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'header';
|
|
20
|
+
column: string | null;
|
|
21
|
+
group: string | null;
|
|
22
|
+
level: number;
|
|
23
|
+
floating: boolean;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'detail';
|
|
26
|
+
row: number;
|
|
27
|
+
column: string;
|
|
28
|
+
};
|
|
29
|
+
export interface MoveOptions {
|
|
30
|
+
dom: boolean;
|
|
31
|
+
scroll: ScrollAlign | false;
|
|
32
|
+
source: FocusChange['source'];
|
|
33
|
+
anchor?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export interface FocusConfig {
|
|
36
|
+
cellFocus: boolean | 'row';
|
|
37
|
+
headerFocus: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface FocusModel {
|
|
40
|
+
position(): FocusPosition | null;
|
|
41
|
+
/** The grid holds DOM focus (tracked with `focusin` / `focusout`). */
|
|
42
|
+
holdsDomFocus(): boolean;
|
|
43
|
+
/** The focused body row; −1 when none (a pinned cell is no body row). */
|
|
44
|
+
focusedRow(): number;
|
|
45
|
+
/** The focused body cell's column; null when none (or a pinned cell). */
|
|
46
|
+
focusedColumn(): string | null;
|
|
47
|
+
/** The master row of the detail stop that is the position; −1 when none (or cell focus is off). */
|
|
48
|
+
detailRow(): number;
|
|
49
|
+
/**
|
|
50
|
+
* Moves the position to the stop of master `row`'s detail — the column focus had (a cell's or a stop's),
|
|
51
|
+
* else the first navigable one — as `move` does; `now`: DOM focus at once when the strip is drawn (Escape, the start
|
|
52
|
+
* sentinel). False without a column to keep (no navigable column).
|
|
53
|
+
*/
|
|
54
|
+
toDetail(row: number, options: MoveOptions, now?: boolean): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Moves the logical position. `dom`: DOM focus follows once the element is drawn (after the next pass); `scroll`:
|
|
57
|
+
* the cell is scrolled into view in the next pass; `anchor`: a group position's leaf (the segment covering it). One
|
|
58
|
+
* `FocusChange` with `source` when the position changed.
|
|
59
|
+
*/
|
|
60
|
+
move(to: FocusPosition, options: MoveOptions): void;
|
|
61
|
+
/** No focused cell or header any more (`setFocusedCell(null)`). */
|
|
62
|
+
clear(source: FocusChange['source']): void;
|
|
63
|
+
/** After every pass: the refocus rule, DOM focus a move asked for, `drawn()` promises. */
|
|
64
|
+
afterPass(): void;
|
|
65
|
+
/** After every header update: the refocus rule (a rebuilt or moved header cell). */
|
|
66
|
+
afterHeaderUpdate(): void;
|
|
67
|
+
/** A splice the grid applied (its row count already updated): the focused row follows its row. */
|
|
68
|
+
splice(at: number, removed: number, inserted: number): void;
|
|
69
|
+
/** A reset or a count change: the index is kept and clamped; no rows → the same column's last header row. */
|
|
70
|
+
reset(rowCount: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* Pinned section `side`'s rows were set (its row count already updated): a focused cell there keeps
|
|
73
|
+
* its index while the section still has it, else goes to the section's last row; with no row left to the first body
|
|
74
|
+
* row in the same column; without body rows either, as when the body empties (`reset`: the same column's last header
|
|
75
|
+
* row, else nothing). `anchor`: the active range's anchor after its clamp when the focused cell was
|
|
76
|
+
* on it before the set — a focused cell that has to move goes there instead, while it names a row that is left.
|
|
77
|
+
* `shift`: the section's rows moved by it at its head first (the pinned grand total came or went as the top
|
|
78
|
+
* section's first row) — a focused cell there, and a kept content row, follow their row before the clamp; one on
|
|
79
|
+
* the leaving row keeps row 0, the first app row now (a content row there goes). One 'data' `FocusChange` when the
|
|
80
|
+
* position moved.
|
|
81
|
+
*/
|
|
82
|
+
sectionChanged(side: SectionSide, anchor?: CellAddress, shift?: 1 | -1): void;
|
|
83
|
+
/** The grid's `settle` after a batch of source changes: one 'data' `FocusChange` if the batch moved the position. */
|
|
84
|
+
settled(): void;
|
|
85
|
+
/**
|
|
86
|
+
* After a managed row move: the position goes to the focused row's new index `row` in `column` —
|
|
87
|
+
* found by key, where the move's splices or reset left it at the old index — scrolled into view for `'keyboard'`
|
|
88
|
+
* only; the batch's pending 'data' change gives way to one `FocusChange` with `source` (`'pointer'` / `'keyboard'`
|
|
89
|
+
* for a moved row, `'data'` for one that was not moved) when the position differs from the one before the move. DOM
|
|
90
|
+
* focus follows by the refocus rule after the pass, while the grid holds it (and the cell is drawn). Also after a
|
|
91
|
+
* drop the app moved itself, once its change shows the dropped focused row where the drop put it. `kind`
|
|
92
|
+
* `'detail'`: the focus was a detail stop, which goes to master `row`'s stop — its cell when that detail is not open
|
|
93
|
+
* there.
|
|
94
|
+
*/
|
|
95
|
+
placeMoved(row: number, column: string, source: 'pointer' | 'keyboard' | 'data', kind?: 'cell' | 'detail'): void;
|
|
96
|
+
/** A new layout was applied: a hidden or removed focused column, a header row or segment that went. */
|
|
97
|
+
columnsChanged(layout: DisplayLayout): void;
|
|
98
|
+
/** A guard received focus: Tab (`forward`) or Shift+Tab (`backward`) into the grid. */
|
|
99
|
+
entry(direction: 'forward' | 'backward'): void;
|
|
100
|
+
/** Moves DOM focus past the grid in the direction of the Tab key being handled (the guards as stepping stones). */
|
|
101
|
+
leave(direction: 'forward' | 'backward'): void;
|
|
102
|
+
/** The first header cell: the first navigable column's topmost header cell; null without one. */
|
|
103
|
+
firstHeader(): FocusPosition | null;
|
|
104
|
+
/**
|
|
105
|
+
* The last header row's cell of `column` (its floating cell when the row shows, else its leaf cell: ↑ on the
|
|
106
|
+
* first row), or without `column` that of the last navigable column (Shift+Tab on the first body cell).
|
|
107
|
+
*/
|
|
108
|
+
lastHeader(column?: string): FocusPosition | null;
|
|
109
|
+
/**
|
|
110
|
+
* The first navigable cell of the first visible row — the first top row's while the top section has rows;
|
|
111
|
+
* null without rows or navigable columns.
|
|
112
|
+
*/
|
|
113
|
+
firstCell(): FocusPosition | null;
|
|
114
|
+
/** A focused group's leaf: the segment covering it is the focused one (a group split by lanes has several). */
|
|
115
|
+
headerAnchor(): string | null;
|
|
116
|
+
/** `grid.focus()`: the remembered position, else the first data cell of the first visible row, else the header. */
|
|
117
|
+
focusGrid(): void;
|
|
118
|
+
/**
|
|
119
|
+
* A popup closed by keyboard hands focus back: an opener inside the grid gives it to its header cell or body
|
|
120
|
+
* cell, a missing opener to the grid's position. False: the popup layer places focus itself (an opener outside the
|
|
121
|
+
* grid, or focus off).
|
|
122
|
+
*/
|
|
123
|
+
restore(opener: HTMLElement | null, source?: FocusChange['source']): boolean;
|
|
124
|
+
/** Resolves once the focused cell is drawn and its row loaded (or failed), or the position changed. */
|
|
125
|
+
drawn(): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* What the row pool draws: null while cell and header focus are off, unless (`cellFocus: false`) content inside a
|
|
128
|
+
* cell renderer holds DOM focus, whose row is then kept. With `section` what that pinned section's pool
|
|
129
|
+
* draws: only a focused cell of that section is its, and it keeps no row (a section draws all its rows).
|
|
130
|
+
*/
|
|
131
|
+
draw(section?: SectionSide): FocusDraw | null;
|
|
132
|
+
/** The grid could not lay out (hidden): `drawn()` promises resolve, as `scrollToRow`'s do. */
|
|
133
|
+
noLayout(): void;
|
|
134
|
+
/**
|
|
135
|
+
* The column slot `frameCenter` keeps in the window while its row is kept: the focused cell's — a pinned one's too,
|
|
136
|
+
* whose section draws with the body's window — or (`cellFocus: false`) that of the cell whose renderer content holds
|
|
137
|
+
* DOM focus; −1 = none.
|
|
138
|
+
*/
|
|
139
|
+
keptSlot(): number;
|
|
140
|
+
/**
|
|
141
|
+
* `keep` names the cell of an open edit, whose row and column stay drawn whatever holds DOM focus. Set
|
|
142
|
+
* while the editing module exists; null: no module, no cost.
|
|
143
|
+
*/
|
|
144
|
+
setEditKeep(keep: (() => EditTarget | null) | null): void;
|
|
145
|
+
config(): Readonly<FocusConfig>;
|
|
146
|
+
configure(config: FocusConfig): void;
|
|
147
|
+
destroy(): void;
|
|
148
|
+
}
|
|
149
|
+
/** The grid's own focusable elements (as opposed to content inside them). */
|
|
150
|
+
export declare const GRID_ELEMENTS = ".ig-cell, .ig-row, .ig-header-cell, .ig-header-group, .ig-floating-cell";
|
|
151
|
+
/** A column the focused cell can be on: a displayed data or group column (`navigable: false` ones by pointer or API). */
|
|
152
|
+
export declare function cellColumn(col: ResolvedColumn | undefined): boolean;
|
|
153
|
+
/** A column arrows, Tab and entry may land on: a cell column without `navigable: false`. */
|
|
154
|
+
export declare function navigable(col: ResolvedColumn | undefined): boolean;
|
|
155
|
+
/** Internal column indices in display order (lanes left → right). */
|
|
156
|
+
export declare function displayed(layout: DisplayLayout): number[];
|
|
157
|
+
export declare function samePosition(a: FocusPosition | null, b: FocusPosition | null): boolean;
|
|
158
|
+
export declare function createFocus(host: InteractHost, initial: FocusConfig): FocusModel;
|