@dcs-tech/ui 0.9.0 → 0.11.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 +488 -0
- package/README.md +43 -7
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/ChartImageMenu-sB2QNQzd.js +9673 -0
- package/dist/ChartView-BstZkP1g.js +1942 -0
- package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-B5ibDNOZ.js} +11 -10
- package/dist/{SummaryImage-Crf1R-3a.js → SummaryImage-CRP7X2Nl.js} +2 -2
- package/dist/SummarySeeAll-CtYRGV4G.js +101 -0
- package/dist/assets/fileTask.worker-D97s2vRV.js +1 -0
- package/dist/columnValue-BOn9NC8X.js +644 -0
- package/dist/exportContext-CMzuzRjc.js +274 -0
- package/dist/{exportEngine-BFZD6djX.js → exportEngine-CYDN8Ty-.js} +167 -137
- package/dist/file-worker.js +1 -1
- package/dist/{fileActions-CFNO14Aj.js → fileActions-DkPEWE-t.js} +1 -1
- package/dist/{geometry-yZmKN662.js → geometry-CFS5If1N.js} +848 -439
- package/dist/index.js +24208 -12603
- package/dist/{labels-CnqqTrne.js → labels-mukFhYkc.js} +126 -1
- package/dist/{runFileTask-BIZTFnZP.js → runFileTask-DI_39TjR.js} +17 -0
- package/dist/scrollArea-B52kugL1.js +291 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-D15kw64n.js} +10 -3
- package/dist/types/components/Alert/Alert.d.ts +16 -0
- package/dist/types/components/Alert/index.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +4 -3
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Charts/BarList.d.ts +4 -3
- package/dist/types/components/Charts/CalendarHeatmap.d.ts +4 -2
- package/dist/types/components/Charts/Chart.d.ts +3 -2
- package/dist/types/components/Charts/ChartView.d.ts +3 -2
- package/dist/types/components/Charts/ColumnChart.d.ts +4 -3
- package/dist/types/components/Charts/Donut.d.ts +3 -2
- package/dist/types/components/Charts/Funnel.d.ts +4 -2
- package/dist/types/components/Charts/Gauge.d.ts +3 -2
- package/dist/types/components/Charts/LineChart.d.ts +4 -3
- package/dist/types/components/Charts/NumberTrend.d.ts +4 -3
- package/dist/types/components/Charts/Progress.d.ts +3 -2
- package/dist/types/components/Charts/StackedBar.d.ts +3 -2
- package/dist/types/components/Charts/Treemap.d.ts +3 -2
- package/dist/types/components/Charts/chartData.d.ts +6 -0
- package/dist/types/components/Charts/chartImage.d.ts +3 -0
- package/dist/types/components/Charts/geometry.d.ts +3 -0
- package/dist/types/components/Charts/index.d.ts +2 -0
- package/dist/types/components/Charts/palette.d.ts +1 -0
- package/dist/types/components/Charts/parts.d.ts +14 -0
- package/dist/types/components/Charts/useChartMotion.d.ts +8 -0
- package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
- package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
- package/dist/types/components/CommandPalette/index.d.ts +2 -0
- package/dist/types/components/DataTable/DataTable.d.ts +3 -1
- package/dist/types/components/DataTable/DisplayPopover.d.ts +1 -0
- package/dist/types/components/DataTable/HeaderMenu.d.ts +1 -0
- package/dist/types/components/DataTable/TableColumnModal.d.ts +4 -1
- package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
- package/dist/types/components/DataTable/TableToolbar.d.ts +21 -1
- package/dist/types/components/DataTable/TableView.d.ts +19 -2
- package/dist/types/components/DataTable/cards/CardView.d.ts +25 -5
- package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
- package/dist/types/components/DataTable/cards/rowParts.d.ts +1 -0
- package/dist/types/components/DataTable/cellSelection/CellRangeBar.d.ts +16 -0
- package/dist/types/components/DataTable/cellSelection/cellRangeStore.d.ts +18 -0
- package/dist/types/components/DataTable/cellSelection/paintRanges.d.ts +2 -0
- package/dist/types/components/DataTable/cellSelection/useCellSelection.d.ts +63 -0
- package/dist/types/components/DataTable/data/listDelta.d.ts +27 -0
- package/dist/types/components/DataTable/data/rowLineage.d.ts +3 -0
- package/dist/types/components/DataTable/data/rowModels.d.ts +9 -0
- package/dist/types/components/DataTable/data/rowTransaction.d.ts +9 -0
- package/dist/types/components/DataTable/data/useServerData.d.ts +3 -1
- package/dist/types/components/DataTable/defaults.d.ts +4 -0
- package/dist/types/components/DataTable/export/exportCells.d.ts +5 -2
- package/dist/types/components/DataTable/export/exportEngine.d.ts +7 -2
- package/dist/types/components/DataTable/export/useTableExport.d.ts +17 -1
- package/dist/types/components/DataTable/filters/filterRowModel.d.ts +1 -0
- package/dist/types/components/DataTable/grouping/groupModel.d.ts +11 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/keyboard/ShortcutsDialog.d.ts +4 -1
- package/dist/types/components/DataTable/keyboard/useGridKeyboard.d.ts +8 -0
- package/dist/types/components/DataTable/labels.d.ts +130 -0
- package/dist/types/components/DataTable/layout/LayoutSwitcher.d.ts +10 -2
- package/dist/types/components/DataTable/layout/useFitWidths.d.ts +7 -0
- package/dist/types/components/DataTable/menu/RowMenu.d.ts +1 -0
- package/dist/types/components/DataTable/menu/buildRowMenu.d.ts +6 -3
- package/dist/types/components/DataTable/motion/RowChangeNotice.d.ts +19 -0
- package/dist/types/components/DataTable/motion/rowChanges.d.ts +25 -0
- package/dist/types/components/DataTable/motion/useNoticeInsets.d.ts +2 -0
- package/dist/types/components/DataTable/motion/useRowChangeNotices.d.ts +35 -0
- package/dist/types/components/DataTable/motion/useRowMotion.d.ts +29 -3
- package/dist/types/components/DataTable/persistence/reconcile.d.ts +4 -0
- package/dist/types/components/DataTable/persistence/useColumnPersistence.d.ts +5 -1
- package/dist/types/components/DataTable/pivot/PivotPanel.d.ts +11 -0
- package/dist/types/components/DataTable/pivot/PivotView.d.ts +22 -0
- package/dist/types/components/DataTable/pivot/pivotModel.d.ts +54 -0
- package/dist/types/components/DataTable/pivot/usePivot.d.ts +44 -0
- package/dist/types/components/DataTable/rows/PressRow.d.ts +1 -0
- package/dist/types/components/DataTable/rows/RowLead.d.ts +23 -0
- package/dist/types/components/DataTable/rows/rowPress.d.ts +2 -0
- package/dist/types/components/DataTable/rows/usePinnedRows.d.ts +34 -0
- package/dist/types/components/DataTable/rows/useRowDrag.d.ts +44 -0
- package/dist/types/components/DataTable/split/SplitView.d.ts +4 -2
- package/dist/types/components/DataTable/summary/SummaryChart.d.ts +2 -1
- package/dist/types/components/DataTable/summary/TableSummary.d.ts +2 -1
- package/dist/types/components/DataTable/summary/summaryModel.d.ts +28 -6
- package/dist/types/components/DataTable/summary/useTableSummary.d.ts +3 -0
- package/dist/types/components/DataTable/toolbar/ToolbarMore.d.ts +14 -0
- package/dist/types/components/DataTable/toolbar/useToolbarFit.d.ts +10 -0
- package/dist/types/components/DataTable/tree/TreeChips.d.ts +5 -0
- package/dist/types/components/DataTable/tree/treeExport.d.ts +54 -0
- package/dist/types/components/DataTable/tree/treeMove.d.ts +1 -0
- package/dist/types/components/DataTable/tree/useTreeChildren.d.ts +15 -0
- package/dist/types/components/DataTable/tree/useTreeData.d.ts +60 -0
- package/dist/types/components/DataTable/types.d.ts +290 -6
- package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
- package/dist/types/components/DataTable/ui.d.ts +2 -1
- package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -4
- package/dist/types/components/DataTable/useTable.d.ts +14 -1
- package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +1 -0
- package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
- package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
- package/dist/types/components/EventCalendar/EventCalendar.d.ts +46 -0
- package/dist/types/components/EventCalendar/eventParts.d.ts +10 -0
- package/dist/types/components/EventCalendar/index.d.ts +3 -0
- package/dist/types/components/EventCalendar/useCalendarEdit.d.ts +40 -0
- package/dist/types/components/FieldWrapper/index.d.ts +1 -1
- package/dist/types/components/Fields/index.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +36 -0
- package/dist/types/components/Icon/Icon.storyData.d.ts +6 -0
- package/dist/types/components/Icon/IconContext.d.ts +7 -0
- package/dist/types/components/Icon/icons.d.ts +223 -0
- package/dist/types/components/Icon/index.d.ts +7 -0
- package/dist/types/components/Icon/useIconDone.d.ts +5 -0
- package/dist/types/components/Image/ImageEditor.d.ts +21 -0
- package/dist/types/components/Image/ImagePicker.d.ts +10 -1
- package/dist/types/components/Image/imageRender.d.ts +33 -0
- package/dist/types/components/Image/index.d.ts +3 -1
- package/dist/types/components/Image/prepareImage.d.ts +4 -3
- package/dist/types/components/Link/Link.d.ts +22 -0
- package/dist/types/components/Link/index.d.ts +2 -0
- package/dist/types/components/NavList/NavList.d.ts +13 -0
- package/dist/types/components/NavList/index.d.ts +2 -0
- package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
- package/dist/types/components/PageProgress/index.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +19 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/Popover/Popover.d.ts +2 -1
- package/dist/types/components/Popover/floatingPosition.d.ts +26 -2
- package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
- package/dist/types/components/ReorderList/ReorderList.d.ts +56 -0
- package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
- package/dist/types/components/ReorderList/index.d.ts +5 -0
- package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
- package/dist/types/components/Scroll/ui.d.ts +1 -0
- package/dist/types/components/SlidingHighlight/index.d.ts +2 -0
- package/dist/types/components/SlidingHighlight/useSlidingHighlight.d.ts +20 -0
- package/dist/types/components/Suggest/SuggestionList.d.ts +1 -0
- package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +120 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +2 -0
- package/dist/types/core/hooks/index.d.ts +2 -1
- package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
- package/dist/types/core/hooks/usePresence.d.ts +1 -0
- package/dist/types/core/icons/actions.icons.d.ts +37 -0
- package/dist/types/core/icons/commerce.icons.d.ts +16 -0
- package/dist/types/core/icons/communication.icons.d.ts +10 -0
- package/dist/types/core/icons/delivery.icons.d.ts +13 -0
- package/dist/types/core/icons/devices.icons.d.ts +16 -0
- package/dist/types/core/icons/files.icons.d.ts +13 -0
- package/dist/types/core/icons/general.icons.d.ts +24 -0
- package/dist/types/core/icons/index.d.ts +14 -0
- package/dist/types/core/icons/media.icons.d.ts +11 -0
- package/dist/types/core/icons/navigation.icons.d.ts +25 -0
- package/dist/types/core/icons/people.icons.d.ts +13 -0
- package/dist/types/core/icons/registry.d.ts +2 -0
- package/dist/types/core/icons/state.icons.d.ts +14 -0
- package/dist/types/core/icons/status.icons.d.ts +10 -0
- package/dist/types/core/icons/table.icons.d.ts +22 -0
- package/dist/types/core/icons/text.icons.d.ts +13 -0
- package/dist/types/core/logic/alert.logic.d.ts +3 -0
- package/dist/types/core/logic/cellRange.logic.d.ts +66 -0
- package/dist/types/core/logic/cellTouch.logic.d.ts +16 -0
- package/dist/types/core/logic/columnGroups.logic.d.ts +31 -0
- package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
- package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
- package/dist/types/core/logic/dropdownSide.logic.d.ts +19 -0
- package/dist/types/core/logic/eventCalendar.logic.d.ts +225 -0
- package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
- package/dist/types/core/logic/fitColumns.logic.d.ts +7 -0
- package/dist/types/core/logic/icon.logic.d.ts +24 -0
- package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
- package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
- package/dist/types/core/logic/index.d.ts +25 -0
- package/dist/types/core/logic/inertProps.d.ts +3 -0
- package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
- package/dist/types/core/logic/pagination.logic.d.ts +7 -0
- package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
- package/dist/types/core/logic/pivot.logic.d.ts +100 -0
- package/dist/types/core/logic/reorder.logic.d.ts +49 -0
- package/dist/types/core/logic/rowActions.logic.d.ts +7 -0
- package/dist/types/core/logic/rowDrag.logic.d.ts +36 -0
- package/dist/types/core/logic/rowPinning.logic.d.ts +12 -0
- package/dist/types/core/logic/slidingHighlight.logic.d.ts +20 -0
- package/dist/types/core/logic/toolbarOverflow.logic.d.ts +21 -0
- package/dist/types/core/logic/treeData.logic.d.ts +44 -0
- package/dist/types/core/logic/treeDrag.logic.d.ts +63 -0
- package/dist/types/core/logic/tween.logic.d.ts +33 -0
- package/dist/types/core/logic/visualViewport.logic.d.ts +13 -0
- package/dist/types/core/types/chipinput.types.d.ts +3 -1
- package/dist/types/core/types/collapsible.types.d.ts +3 -0
- package/dist/types/core/types/datePicker.types.d.ts +7 -0
- package/dist/types/core/types/eventCalendar.types.d.ts +18 -0
- package/dist/types/core/types/field.types.d.ts +6 -3
- package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
- package/dist/types/core/types/fields.types.d.ts +6 -1
- package/dist/types/core/types/fileEngine.types.d.ts +6 -0
- package/dist/types/core/types/form.types.d.ts +1 -0
- package/dist/types/core/types/format.types.d.ts +2 -0
- package/dist/types/core/types/icon.types.d.ts +109 -0
- package/dist/types/core/types/index.d.ts +2 -0
- package/dist/types/core/types/input.types.d.ts +2 -0
- package/dist/types/core/types/navigation.types.d.ts +1 -0
- package/dist/types/core/types/select.types.d.ts +2 -6
- package/dist/types/core/types/suggest.types.d.ts +2 -0
- package/dist/types/index.d.ts +31 -6
- package/package.json +4 -4
- package/dist/ChartImageMenu-DDVNJNc6.js +0 -1499
- package/dist/ChartView-CW3m4Z_1.js +0 -1703
- package/dist/SummarySeeAll-BRHOMQRA.js +0 -101
- package/dist/assets/fileTask.worker--Q3rI3Bn.js +0 -1
- package/dist/columnValue-DwUqueZ6.js +0 -610
- package/dist/exportContext-BKFnNQ0q.js +0 -166
- package/dist/scrollArea-DbYFqbIH.js +0 -269
- package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
- package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
- package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DataTableSummaryAnyChart } from './types';
|
|
2
2
|
export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
3
3
|
toolbar: string;
|
|
4
|
+
toolbarMore: string;
|
|
5
|
+
toolbarMoreOn: string;
|
|
4
6
|
search: string;
|
|
5
7
|
searchPlaceholder: string;
|
|
6
8
|
closeSearch: string;
|
|
@@ -19,6 +21,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
19
21
|
columnFilters: string;
|
|
20
22
|
layout: string;
|
|
21
23
|
layoutCurrent: (layout: string) => string;
|
|
24
|
+
layoutFieldsItem: (fields: string) => string;
|
|
22
25
|
layoutTable: string;
|
|
23
26
|
layoutCards: string;
|
|
24
27
|
layoutSplit: string;
|
|
@@ -80,6 +83,16 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
80
83
|
undoFailed: string;
|
|
81
84
|
dismiss: string;
|
|
82
85
|
dataTable: string;
|
|
86
|
+
rowsNewAbove: (n: string, count: number) => string;
|
|
87
|
+
rowsNewBelow: (n: string, count: number) => string;
|
|
88
|
+
rowsNewOnOtherPages: (n: string, count: number) => string;
|
|
89
|
+
rowsRemovedAbove: (n: string) => string;
|
|
90
|
+
rowsRemovedBelow: (n: string) => string;
|
|
91
|
+
rowsKeptInPlace: (n: string, count: number) => string;
|
|
92
|
+
sortNow: string;
|
|
93
|
+
pauseUpdates: string;
|
|
94
|
+
resumeUpdates: (n: string, count: number) => string;
|
|
95
|
+
rowsChangedAnnouncement: (added: string, removed: string, addedCount: number, removedCount: number) => string;
|
|
83
96
|
selectAllRows: string;
|
|
84
97
|
selectRow: (n: string) => string;
|
|
85
98
|
open: string;
|
|
@@ -87,12 +100,44 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
87
100
|
actions: string;
|
|
88
101
|
expandRow: string;
|
|
89
102
|
collapseRow: string;
|
|
103
|
+
rowDragHandle: (row: string) => string;
|
|
104
|
+
rowDragHint: string;
|
|
105
|
+
rowDragOffSorted: string;
|
|
106
|
+
rowDragOffSearched: string;
|
|
107
|
+
rowDragOffFiltered: string;
|
|
108
|
+
rowDragOffGrouped: string;
|
|
109
|
+
rowDragPicked: (row: string, at: string, of: string) => string;
|
|
110
|
+
rowDragPickedMany: (n: string, at: string, of: string) => string;
|
|
111
|
+
rowDragAt: (at: string, of: string) => string;
|
|
112
|
+
rowDragDropped: (row: string, at: string, of: string) => string;
|
|
113
|
+
rowDragDroppedMany: (n: string, at: string, of: string) => string;
|
|
114
|
+
rowDragCancelled: (row: string) => string;
|
|
115
|
+
rowDragMore: (n: string) => string;
|
|
116
|
+
rowDragTreeIn: (parent: string, at: string, of: string) => string;
|
|
117
|
+
rowDragTreeTop: (at: string, of: string) => string;
|
|
118
|
+
rowDragTreeInto: (parent: string, at: string, of: string) => string;
|
|
119
|
+
rowDragTreeToTop: (at: string, of: string) => string;
|
|
120
|
+
rowDragTreePicked: (row: string, where: string) => string;
|
|
121
|
+
rowDragTreePickedMany: (n: string, where: string) => string;
|
|
122
|
+
rowDragTreeDropped: (row: string, where: string) => string;
|
|
123
|
+
rowDragTreeDroppedMany: (n: string, where: string) => string;
|
|
124
|
+
rowDragTreeNoIndent: string;
|
|
125
|
+
rowDragTreeNoOutdent: string;
|
|
126
|
+
treeExpand: (row: string) => string;
|
|
127
|
+
treeCollapse: (row: string) => string;
|
|
128
|
+
treeLoading: string;
|
|
129
|
+
treeLoadFailed: string;
|
|
130
|
+
treeExpandAll: string;
|
|
131
|
+
treeCollapseAll: string;
|
|
132
|
+
treeRows: string;
|
|
133
|
+
treeLevel: string;
|
|
90
134
|
showMore: string;
|
|
91
135
|
showLess: string;
|
|
92
136
|
total: string;
|
|
93
137
|
yes: string;
|
|
94
138
|
no: string;
|
|
95
139
|
empty: string;
|
|
140
|
+
noResults: string;
|
|
96
141
|
loading: string;
|
|
97
142
|
loadError: string;
|
|
98
143
|
rowsHidden: string;
|
|
@@ -111,6 +156,11 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
111
156
|
copyFailed: string;
|
|
112
157
|
selectRowMenu: string;
|
|
113
158
|
unselectRowMenu: string;
|
|
159
|
+
pinRowTop: string;
|
|
160
|
+
pinRowBottom: string;
|
|
161
|
+
unpinRow: string;
|
|
162
|
+
pinnedRowTop: string;
|
|
163
|
+
pinnedRowBottom: string;
|
|
114
164
|
filterOnly: (value: string) => string;
|
|
115
165
|
filterAdd: (value: string) => string;
|
|
116
166
|
filterHide: (value: string) => string;
|
|
@@ -177,6 +227,34 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
177
227
|
kbFilterOnly: string;
|
|
178
228
|
kbFilterHide: string;
|
|
179
229
|
selectionCleared: string;
|
|
230
|
+
kbCellRange: string;
|
|
231
|
+
kbCellRangeEdge: string;
|
|
232
|
+
kbCellAdd: string;
|
|
233
|
+
kbCellAll: string;
|
|
234
|
+
kbCellCopy: string;
|
|
235
|
+
kbCellPaste: string;
|
|
236
|
+
kbCellRows: string;
|
|
237
|
+
kbCellEscape: string;
|
|
238
|
+
cellRangeAnnouncement: (cells: string, rows: string, columns: string, count: {
|
|
239
|
+
cells: number;
|
|
240
|
+
rows: number;
|
|
241
|
+
columns: number;
|
|
242
|
+
ranges: number;
|
|
243
|
+
}) => string;
|
|
244
|
+
cellRangeCleared: string;
|
|
245
|
+
cellsCopied: (n: string, count: number) => string;
|
|
246
|
+
cellsPasted: (n: string, count: number) => string;
|
|
247
|
+
cellRangeBar: string;
|
|
248
|
+
cellRangeCount: string;
|
|
249
|
+
cellRangeSum: string;
|
|
250
|
+
cellRangeAvg: string;
|
|
251
|
+
cellRangeMin: string;
|
|
252
|
+
cellRangeMax: string;
|
|
253
|
+
cellTouchBar: string;
|
|
254
|
+
cellTouchSize: (n: string, count: number) => string;
|
|
255
|
+
cellTouchCopy: string;
|
|
256
|
+
cellTouchMenu: string;
|
|
257
|
+
cellTouchClear: string;
|
|
180
258
|
groupButton: string;
|
|
181
259
|
groupButtonOn: (columns: string) => string;
|
|
182
260
|
groupMenu: string;
|
|
@@ -265,6 +343,9 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
265
343
|
actionDisplayMode: string;
|
|
266
344
|
actionDisplayModeCard: string;
|
|
267
345
|
actionDisplayModeHint: string;
|
|
346
|
+
maxVisibleActions: string;
|
|
347
|
+
maxVisibleActionsCard: string;
|
|
348
|
+
maxVisibleActionsHint: string;
|
|
268
349
|
modeIcon: string;
|
|
269
350
|
modeLabel: string;
|
|
270
351
|
modeIconLabel: string;
|
|
@@ -424,6 +505,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
424
505
|
summaryWidthFull: string;
|
|
425
506
|
summaryWidthAuto: (best: string) => string;
|
|
426
507
|
summaryWidthBetter: (best: string) => string;
|
|
508
|
+
manageSummaryRangeHint: string;
|
|
427
509
|
summarySeeAll: (n: string) => string;
|
|
428
510
|
summaryAllOf: (title: string, n: string) => string;
|
|
429
511
|
summaryLoading: string;
|
|
@@ -463,6 +545,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
463
545
|
exportAwaitingClick: (title: string) => string;
|
|
464
546
|
exportValidationFailed: string;
|
|
465
547
|
exportCapped: (shown: string, total: string) => string;
|
|
548
|
+
exportTreePartial: string;
|
|
466
549
|
exportBusiness: string;
|
|
467
550
|
exportAddress: string;
|
|
468
551
|
exportPhone: string;
|
|
@@ -470,6 +553,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
470
553
|
exportFiltersLabel: string;
|
|
471
554
|
exportSearchLabel: string;
|
|
472
555
|
exportRowsLabel: string;
|
|
556
|
+
exportNoteLabel: string;
|
|
473
557
|
exportRowsTotal: (n: string) => string;
|
|
474
558
|
exportRowsFiltered: (n: string) => string;
|
|
475
559
|
exportRowsExported: (n: string) => string;
|
|
@@ -596,6 +680,7 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
596
680
|
listAllInList: string;
|
|
597
681
|
fieldsDropHere: string;
|
|
598
682
|
fieldsRemove: (field: string) => string;
|
|
683
|
+
fieldsMove: (field: string) => string;
|
|
599
684
|
fieldsAdd: string;
|
|
600
685
|
fieldsLivePreview: string;
|
|
601
686
|
cardPreviewCard: string;
|
|
@@ -605,6 +690,51 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
605
690
|
fieldsTab: string;
|
|
606
691
|
previewTab: string;
|
|
607
692
|
fieldsResetDefault: string;
|
|
693
|
+
pivot: string;
|
|
694
|
+
pivotOn: string;
|
|
695
|
+
pivotTitle: string;
|
|
696
|
+
pivotSubtitle: string;
|
|
697
|
+
pivotMode: string;
|
|
698
|
+
pivotModeHint: string;
|
|
699
|
+
pivotRows: string;
|
|
700
|
+
pivotRowsHint: string;
|
|
701
|
+
pivotColumns: string;
|
|
702
|
+
pivotColumnsHint: string;
|
|
703
|
+
pivotValues: string;
|
|
704
|
+
pivotValuesHint: string;
|
|
705
|
+
pivotFields: string;
|
|
706
|
+
pivotFieldsHint: string;
|
|
707
|
+
pivotAllPlaced: string;
|
|
708
|
+
pivotDropHere: string;
|
|
709
|
+
pivotAdd: string;
|
|
710
|
+
pivotAddTo: (part: string) => string;
|
|
711
|
+
pivotAddField: (field: string, part: string) => string;
|
|
712
|
+
pivotRemove: (field: string) => string;
|
|
713
|
+
pivotMove: (field: string) => string;
|
|
714
|
+
pivotAggregation: (field: string) => string;
|
|
715
|
+
pivotAggSum: string;
|
|
716
|
+
pivotAggCount: string;
|
|
717
|
+
pivotAggAvg: string;
|
|
718
|
+
pivotAggMin: string;
|
|
719
|
+
pivotAggMax: string;
|
|
720
|
+
pivotAggFirst: string;
|
|
721
|
+
pivotAggLast: string;
|
|
722
|
+
pivotAggCustom: string;
|
|
723
|
+
pivotValueHeader: (agg: string, column: string) => string;
|
|
724
|
+
pivotTotal: string;
|
|
725
|
+
pivotTotalOf: (value: string) => string;
|
|
726
|
+
pivotGrandTotal: string;
|
|
727
|
+
pivotTotals: string;
|
|
728
|
+
pivotTotalsRows: string;
|
|
729
|
+
pivotTotalsColumns: string;
|
|
730
|
+
pivotTotalsGrand: string;
|
|
731
|
+
pivotCapped: (shown: string, total: string) => string;
|
|
732
|
+
pivotNoValues: string;
|
|
733
|
+
pivotNoRows: string;
|
|
734
|
+
pivotLoadFailed: string;
|
|
735
|
+
pivotResult: string;
|
|
736
|
+
pivotReset: string;
|
|
737
|
+
pivotFieldsOf: (n: string) => string;
|
|
608
738
|
prefsChanged: (what: string) => string;
|
|
609
739
|
prefsColumnsGone: (n: string, count: number) => string;
|
|
610
740
|
prefsFiltersOff: (n: string, count: number) => string;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DataTableLayout } from '../types';
|
|
3
3
|
export declare const LAYOUT_ICONS: Record<DataTableLayout, React.ReactNode>;
|
|
4
|
-
export
|
|
4
|
+
export interface LayoutFieldsEntry {
|
|
5
|
+
label: string;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
onOpen: () => void;
|
|
8
|
+
}
|
|
9
|
+
interface LayoutSwitcherProps {
|
|
5
10
|
layouts: DataTableLayout[];
|
|
6
11
|
layout: DataTableLayout;
|
|
7
12
|
onChange: (layout: DataTableLayout) => void;
|
|
8
|
-
|
|
13
|
+
compact?: boolean;
|
|
14
|
+
fields?: LayoutFieldsEntry;
|
|
15
|
+
}
|
|
16
|
+
export declare function LayoutSwitcher({ layouts, layout, onChange, compact, fields }: LayoutSwitcherProps): React.JSX.Element | null;
|
|
9
17
|
export default LayoutSwitcher;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type FitColumn } from '../../../core/logic';
|
|
3
|
+
export interface FitWidthColumn extends FitColumn {
|
|
4
|
+
scaledMin?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const FIT_COL_ATTR = "data-fit-col";
|
|
7
|
+
export declare function useFitWidths(tableRef: RefObject<HTMLTableElement | null>, boxRef: RefObject<HTMLElement | null>, active: boolean, columns: FitWidthColumn[], reserved: number, key: string): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { DataTableCardFields, DataTableFilterGroup, DataTableRowMenuConfig, DataTableRowMenuBuiltIn, DataTableRowAction, DataTableColumn } from '../types';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { DataTableCardFields, DataTableFilterGroup, DataTableRowMenuConfig, DataTableRowMenuBuiltIn, DataTableRowAction, DataTableColumn, DataTableRowPinSide } from '../types';
|
|
3
3
|
import type { DataTableLabels } from '../labels';
|
|
4
4
|
import type { RowMenuModel } from './RowMenu';
|
|
5
|
-
export declare function NotEqualIcon(): React.JSX.Element;
|
|
6
5
|
export declare const DEFAULT_BUILT_INS: DataTableRowMenuBuiltIn[];
|
|
7
6
|
export interface RowMenuContext<T> {
|
|
8
7
|
row: T;
|
|
@@ -31,5 +30,9 @@ export interface RowMenuContext<T> {
|
|
|
31
30
|
filterGroup: DataTableFilterGroup;
|
|
32
31
|
onFilter: (group: DataTableFilterGroup) => void;
|
|
33
32
|
format: (n: number) => string;
|
|
33
|
+
pin?: {
|
|
34
|
+
side: DataTableRowPinSide | null;
|
|
35
|
+
onPin: (side: DataTableRowPinSide | null) => void;
|
|
36
|
+
};
|
|
34
37
|
}
|
|
35
38
|
export declare function buildRowMenu<T>(ctx: RowMenuContext<T>): RowMenuModel;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RowChangeNotice as Notice } from './useRowChangeNotices';
|
|
2
|
+
export interface LiveUpdatesControl {
|
|
3
|
+
paused: boolean;
|
|
4
|
+
waiting: number;
|
|
5
|
+
onPause: () => void;
|
|
6
|
+
onResume: () => void;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
notice: Notice;
|
|
10
|
+
side: 'top' | 'bottom';
|
|
11
|
+
onJump: (side: 'above' | 'below') => void;
|
|
12
|
+
onOtherPages: () => void;
|
|
13
|
+
onDismiss: () => void;
|
|
14
|
+
held?: number;
|
|
15
|
+
onSortNow?: () => void;
|
|
16
|
+
live?: LiveUpdatesControl | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function RowChangeNotice({ notice, side, onJump, onOtherPages, onDismiss, held, onSortNow, live }: Props): import("react").JSX.Element | null;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { DataTableFlashColor, DataTableRowChanges } from '../types';
|
|
3
|
+
import { type RowChangeReport } from './useRowMotion';
|
|
4
|
+
export interface RowChangesOptions {
|
|
5
|
+
enterMs: number;
|
|
6
|
+
exitMs: number;
|
|
7
|
+
maxAnimated: number;
|
|
8
|
+
onChange?: (report: RowChangeReport) => void;
|
|
9
|
+
which?: (added: string[], removed: string[]) => {
|
|
10
|
+
added: string[];
|
|
11
|
+
removed: string[];
|
|
12
|
+
};
|
|
13
|
+
held?: ReadonlyMap<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface ResolvedRowChanges {
|
|
16
|
+
enterMs: number;
|
|
17
|
+
exitMs: number;
|
|
18
|
+
maxAnimated: number;
|
|
19
|
+
outOfView: boolean;
|
|
20
|
+
announce: boolean;
|
|
21
|
+
pauseControl: boolean;
|
|
22
|
+
style: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
export declare const rowChangeColor: (c: DataTableFlashColor) => string;
|
|
25
|
+
export declare function resolveRowChanges(cfg: DataTableRowChanges | undefined): ResolvedRowChanges;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type RowChangeReport } from './useRowMotion';
|
|
3
|
+
export type Where = 'above' | 'in' | 'below';
|
|
4
|
+
export interface RowChangeNotice {
|
|
5
|
+
addedAbove: number;
|
|
6
|
+
addedBelow: number;
|
|
7
|
+
removedAbove: number;
|
|
8
|
+
removedBelow: number;
|
|
9
|
+
otherPages: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function rowElement(area: HTMLElement, key: string, exit?: boolean): HTMLElement | null;
|
|
12
|
+
export declare function whereIs(el: HTMLElement, area: HTMLElement): Where;
|
|
13
|
+
export interface RowChangeNoticesOptions {
|
|
14
|
+
areaRef: RefObject<HTMLElement | null>;
|
|
15
|
+
outOfView: boolean;
|
|
16
|
+
announce: boolean;
|
|
17
|
+
tellFromViews: boolean;
|
|
18
|
+
placeOf: (key: string) => number;
|
|
19
|
+
reveal: (key: string) => void;
|
|
20
|
+
describe: (added: number, removed: number) => string;
|
|
21
|
+
}
|
|
22
|
+
export interface RowChangeNotices {
|
|
23
|
+
notice: RowChangeNotice;
|
|
24
|
+
onChange: (report: RowChangeReport) => void;
|
|
25
|
+
addOtherPages: (keys: string[]) => void;
|
|
26
|
+
otherPageKeys: () => string[];
|
|
27
|
+
jump: (side: 'above' | 'below') => void;
|
|
28
|
+
dismiss: () => void;
|
|
29
|
+
announcement: string;
|
|
30
|
+
pulse: (key: string) => void;
|
|
31
|
+
tell: (added: number, removed: number) => void;
|
|
32
|
+
refresh: () => void;
|
|
33
|
+
bringIntoView: (key: string, flash?: boolean) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function useRowChangeNotices(opts: RowChangeNoticesOptions): RowChangeNotices;
|
|
@@ -5,14 +5,26 @@ export interface MotionItem<T> {
|
|
|
5
5
|
item: T;
|
|
6
6
|
motion?: RowMotion;
|
|
7
7
|
}
|
|
8
|
-
export declare const EXIT_MS =
|
|
9
|
-
export declare const ENTER_MS =
|
|
8
|
+
export declare const EXIT_MS = 700;
|
|
9
|
+
export declare const ENTER_MS = 2000;
|
|
10
|
+
export declare const MAX_ANIMATED_ROWS = 25;
|
|
10
11
|
export declare function prefersReducedMotion(): boolean;
|
|
12
|
+
export declare function visibleSpan(el: HTMLElement): {
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
};
|
|
11
16
|
interface Exit<T> {
|
|
12
17
|
key: string;
|
|
13
18
|
item: T;
|
|
14
19
|
at: number;
|
|
15
20
|
}
|
|
21
|
+
export declare function rowDiff(before: string[], after: string[]): {
|
|
22
|
+
added: string[];
|
|
23
|
+
removed: Array<{
|
|
24
|
+
key: string;
|
|
25
|
+
at: number;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
16
28
|
export declare function diffRows(before: string[], after: string[]): {
|
|
17
29
|
added: string[];
|
|
18
30
|
removed: Array<{
|
|
@@ -20,11 +32,25 @@ export declare function diffRows(before: string[], after: string[]): {
|
|
|
20
32
|
at: number;
|
|
21
33
|
}>;
|
|
22
34
|
} | null;
|
|
23
|
-
export
|
|
35
|
+
export interface RowChangeReport {
|
|
36
|
+
added: string[];
|
|
37
|
+
removed: string[];
|
|
38
|
+
removedAt: number[];
|
|
39
|
+
marked: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare function mergeExits<T>(items: Array<MotionItem<T>>, exits: Array<Exit<T>>, has?: (key: string) => boolean): Array<MotionItem<T>>;
|
|
24
42
|
export declare function useRowMotion<T>(items: T[], keyOf: (item: T) => string, opts: {
|
|
25
43
|
enabled: boolean;
|
|
26
44
|
resetKey: string | undefined;
|
|
27
45
|
containerRef: RefObject<HTMLElement | null>;
|
|
46
|
+
enterMs?: number;
|
|
47
|
+
exitMs?: number;
|
|
48
|
+
maxAnimated?: number;
|
|
49
|
+
onChange?: (report: RowChangeReport) => void;
|
|
50
|
+
which?: (added: string[], removed: string[]) => {
|
|
51
|
+
added: string[];
|
|
52
|
+
removed: string[];
|
|
53
|
+
};
|
|
28
54
|
}): {
|
|
29
55
|
items: Array<MotionItem<T>>;
|
|
30
56
|
heightOf: (key: string) => number | undefined;
|
|
@@ -22,6 +22,9 @@ export interface ViewPrefsContext extends PrefsVersioning {
|
|
|
22
22
|
summaryCharts?: ReadonlyMap<string, readonly string[]>;
|
|
23
23
|
summaryCounts?: ReadonlyMap<string, readonly number[]>;
|
|
24
24
|
summaryBreakdowns: ReadonlySet<string>;
|
|
25
|
+
pivotOffered?: boolean;
|
|
26
|
+
pivotFields?: ReadonlySet<string>;
|
|
27
|
+
pivotValues?: ReadonlyMap<string, readonly string[]>;
|
|
25
28
|
}
|
|
26
29
|
export interface ManagePrefsContext extends PrefsVersioning {
|
|
27
30
|
key: string;
|
|
@@ -44,6 +47,7 @@ export declare function viewPrefsContext(view: DataTableView, opts: {
|
|
|
44
47
|
key: string;
|
|
45
48
|
serverMode: boolean;
|
|
46
49
|
hasGroupsSource: boolean;
|
|
50
|
+
hasPivotSource?: boolean;
|
|
47
51
|
operators?: readonly string[];
|
|
48
52
|
summaryBreakdownFields?: readonly string[];
|
|
49
53
|
} & PrefsVersioning): ViewPrefsContext;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type DataTableExportSettings, type DataTableCardFields, type DataTableListFields, type DataTableLayout, type DataTableSavedFilter, type DataTableDisplayPrefs, type DataTablePdfPageSize, type DataTablePdfOrientation, type DataTablePdfFontSize, type DataTablePdfMargins, type DataTablePersistence, type DataTableColumnPinning, type DataTableExportSummaryMode, type DataTableSummaryPrefs, type DataTableExportOptionValues } from '../types';
|
|
1
|
+
import { type DataTableExportSettings, type DataTableCardFields, type DataTableListFields, type DataTableLayout, type DataTableSavedFilter, type DataTableDisplayPrefs, type DataTablePdfPageSize, type DataTablePdfOrientation, type DataTablePdfFontSize, type DataTablePdfMargins, type DataTablePersistence, type DataTableColumnPinning, type DataTableExportSummaryMode, type DataTableSummaryPrefs, type DataTableExportOptionValues, type DataTablePivotState } from '../types';
|
|
2
2
|
import type { PrefsReconciled, PrefsReport } from './reconcile';
|
|
3
|
+
import { type RowPins } from '../../../core/logic';
|
|
3
4
|
export declare const PREFS_SAVE_DEBOUNCE_MS = 500;
|
|
4
5
|
export declare const EXPORT_SETTINGS_DEFAULTS: DataTableExportSettings;
|
|
5
6
|
export interface TemplateExportPrefs {
|
|
@@ -37,6 +38,9 @@ export interface ViewExtras {
|
|
|
37
38
|
setListFields?: (fields: DataTableListFields) => void;
|
|
38
39
|
setGrouping?: (levels: string[]) => void;
|
|
39
40
|
setSummary?: (prefs: DataTableSummaryPrefs) => void;
|
|
41
|
+
rowPins?: RowPins;
|
|
42
|
+
setRowPins?: (pins: RowPins) => void;
|
|
43
|
+
setPivot?: (state: DataTablePivotState) => void;
|
|
40
44
|
}
|
|
41
45
|
export interface ViewDocSync {
|
|
42
46
|
reconcile: (doc: Record<string, any>, key: string) => PrefsReconciled;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataTablePivotState } from '../types';
|
|
3
|
+
import { type ResolvedPivot } from './pivotModel';
|
|
4
|
+
interface PivotPanelProps<T> {
|
|
5
|
+
resolved: ResolvedPivot<T>;
|
|
6
|
+
state: DataTablePivotState;
|
|
7
|
+
onApply: (state: DataTablePivotState) => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function PivotPanel<T>({ resolved, state: initial, onApply, onClose }: PivotPanelProps<T>): React.JSX.Element;
|
|
11
|
+
export default PivotPanel;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { type MutableRefObject, type RefObject } from 'react';
|
|
2
|
+
import type { DataTableCellRange, DataTableDisplayPrefs, DataTableView } from '../types';
|
|
3
|
+
import type { PivotOutput } from './usePivot';
|
|
4
|
+
interface PivotViewProps<T> {
|
|
5
|
+
pivot: PivotOutput<T>;
|
|
6
|
+
view: DataTableView<T>;
|
|
7
|
+
displayPrefs: DataTableDisplayPrefs;
|
|
8
|
+
areaRef: RefObject<HTMLDivElement | null>;
|
|
9
|
+
keyboard: boolean;
|
|
10
|
+
phone: boolean;
|
|
11
|
+
canCopy: boolean;
|
|
12
|
+
copy: (text: string, cells: number) => void;
|
|
13
|
+
openHelp: () => void;
|
|
14
|
+
emptyText: string;
|
|
15
|
+
rangesRef?: MutableRefObject<PivotRanges | null>;
|
|
16
|
+
}
|
|
17
|
+
export interface PivotRanges {
|
|
18
|
+
getCellRanges: () => DataTableCellRange[];
|
|
19
|
+
clearCellRanges: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function PivotView<T>({ pivot, view, displayPrefs, areaRef, keyboard, phone, canCopy, copy, openHelp, emptyText, rangesRef }: PivotViewProps<T>): React.JSX.Element;
|
|
22
|
+
export default PivotView;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PivotAggFn, type PivotAggName, type PivotColumn, type PivotCube, type PivotKey, type PivotLayout, type PivotLine, type PivotSort, type PivotSpec } from '../../../core/logic';
|
|
2
|
+
import { type GroupLabels } from '../grouping/groupModel';
|
|
3
|
+
import type { DataTableLabels } from '../labels';
|
|
4
|
+
import type { DataTableColumn, DataTableColumnGroup, DataTablePivotRequest, DataTablePivotState, DataTablePivotTotals, DataTableView } from '../types';
|
|
5
|
+
export declare const PIVOT_MAX_COLUMNS = 200;
|
|
6
|
+
export interface ResolvedPivot<T> {
|
|
7
|
+
offered: boolean;
|
|
8
|
+
panel: boolean;
|
|
9
|
+
fields: DataTableColumn<T>[];
|
|
10
|
+
values: DataTableColumn<T>[];
|
|
11
|
+
aggsOf: (column: string) => string[];
|
|
12
|
+
aggLabel: (agg: string) => string;
|
|
13
|
+
aggFn: (agg: string) => PivotAggName | PivotAggFn<T> | null;
|
|
14
|
+
defaults: DataTablePivotState;
|
|
15
|
+
maxColumns: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolvePivot<T>(view: Pick<DataTableView<T>, 'pivot'>, columns: DataTableColumn<T>[], opts: {
|
|
18
|
+
serverMode: boolean;
|
|
19
|
+
hasSource: boolean;
|
|
20
|
+
labels: DataTableLabels;
|
|
21
|
+
}): ResolvedPivot<T>;
|
|
22
|
+
export declare const pivotTotalsOf: (t: DataTablePivotTotals | undefined) => Required<DataTablePivotTotals>;
|
|
23
|
+
export declare function normalizePivotState<T>(state: unknown, r: Pick<ResolvedPivot<T>, 'fields' | 'values' | 'aggsOf'>): DataTablePivotState;
|
|
24
|
+
export declare const samePivot: (a: DataTablePivotState, b: DataTablePivotState) => boolean;
|
|
25
|
+
export declare function pivotSpecOf<T>(state: DataTablePivotState, r: Pick<ResolvedPivot<T>, 'aggFn'>, byKey: ReadonlyMap<string, DataTableColumn<T>>): PivotSpec<T>;
|
|
26
|
+
export declare function pivotRequestOf<T>(state: DataTablePivotState, byKey: ReadonlyMap<string, DataTableColumn<T>>): DataTablePivotRequest;
|
|
27
|
+
export declare function keyOrderOf<T>(col: DataTableColumn<T> | undefined): (a: PivotKey, b: PivotKey) => number;
|
|
28
|
+
export interface PivotRow {
|
|
29
|
+
key: string;
|
|
30
|
+
kind: PivotLine['kind'];
|
|
31
|
+
depth: number;
|
|
32
|
+
f: string[];
|
|
33
|
+
v: unknown[];
|
|
34
|
+
}
|
|
35
|
+
export interface PivotTable {
|
|
36
|
+
columns: DataTableColumn<PivotRow>[];
|
|
37
|
+
groups: DataTableColumnGroup[];
|
|
38
|
+
rows: PivotRow[];
|
|
39
|
+
rowByLine: ReadonlyMap<string, PivotRow>;
|
|
40
|
+
grand: PivotRow | null;
|
|
41
|
+
fieldKeys: string[];
|
|
42
|
+
slots: ReadonlyMap<string, PivotColumn>;
|
|
43
|
+
}
|
|
44
|
+
export declare function pivotTableOf<T>(cube: PivotCube, layout: PivotLayout, ctx: {
|
|
45
|
+
state: DataTablePivotState;
|
|
46
|
+
byKey: ReadonlyMap<string, DataTableColumn<T>>;
|
|
47
|
+
resolved: Pick<ResolvedPivot<T>, 'aggLabel'>;
|
|
48
|
+
labels: DataTableLabels;
|
|
49
|
+
groupLabels: GroupLabels;
|
|
50
|
+
}): PivotTable;
|
|
51
|
+
export declare function pivotSortsOf(sorting: ReadonlyArray<{
|
|
52
|
+
id: string;
|
|
53
|
+
desc: boolean;
|
|
54
|
+
}>, table: Pick<PivotTable, 'fieldKeys' | 'slots'>): PivotSort[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { GroupLabels } from '../grouping/groupModel';
|
|
2
|
+
import type { DataTableLabels } from '../labels';
|
|
3
|
+
import type { DataTableColumn, DataTableDataSource, DataTablePivotState, DataTableQuery, DataTableRowTransaction, DataTableTransactionResult } from '../types';
|
|
4
|
+
import { type PivotRow, type PivotTable, type ResolvedPivot } from './pivotModel';
|
|
5
|
+
export declare const PIVOT_SETTLE_MS = 250;
|
|
6
|
+
export declare const PIVOT_SLICE_ROWS = 20000;
|
|
7
|
+
export declare function transactionKeysOf<T>(tx: DataTableRowTransaction<T>, rowKey: string | undefined): DataTableTransactionResult | null;
|
|
8
|
+
type Sorting = Array<{
|
|
9
|
+
id: string;
|
|
10
|
+
desc: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export interface PivotOutput<T> {
|
|
13
|
+
resolved: ResolvedPivot<T>;
|
|
14
|
+
state: DataTablePivotState;
|
|
15
|
+
on: boolean;
|
|
16
|
+
table: PivotTable | null;
|
|
17
|
+
rows: PivotRow[];
|
|
18
|
+
capped: {
|
|
19
|
+
shown: number;
|
|
20
|
+
total: number;
|
|
21
|
+
} | null;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
error: unknown;
|
|
24
|
+
retry: () => void;
|
|
25
|
+
sorting: Sorting;
|
|
26
|
+
setSorting: (s: Sorting) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function usePivot<T>(opts: {
|
|
29
|
+
resolved: ResolvedPivot<T>;
|
|
30
|
+
state: DataTablePivotState;
|
|
31
|
+
on: boolean;
|
|
32
|
+
viewId: string;
|
|
33
|
+
columns: DataTableColumn<T>[];
|
|
34
|
+
serverMode: boolean;
|
|
35
|
+
dataSource?: DataTableDataSource<T>;
|
|
36
|
+
rows: T[];
|
|
37
|
+
queryKey: string;
|
|
38
|
+
query: DataTableQuery | null;
|
|
39
|
+
tick: number;
|
|
40
|
+
changes?: number;
|
|
41
|
+
labels: DataTableLabels;
|
|
42
|
+
groupLabels: GroupLabels;
|
|
43
|
+
}): PivotOutput<T>;
|
|
44
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
interface PressRowProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
3
|
as: 'tr' | 'div';
|
|
4
4
|
pressable: boolean;
|
|
5
|
+
feedback?: 'tint' | 'wave';
|
|
5
6
|
}
|
|
6
7
|
export declare const PressRow: React.ForwardRefExoticComponent<PressRowProps & React.RefAttributes<HTMLElement>>;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TreeLineState } from '../grouping/groupModel';
|
|
3
|
+
export interface RowLeadProps {
|
|
4
|
+
rowId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
drag?: {
|
|
7
|
+
blocked: string | null;
|
|
8
|
+
tabbable: boolean;
|
|
9
|
+
props: Record<string, unknown>;
|
|
10
|
+
};
|
|
11
|
+
dragSpace?: boolean;
|
|
12
|
+
tree?: {
|
|
13
|
+
depth: number;
|
|
14
|
+
state?: TreeLineState;
|
|
15
|
+
onToggle: () => void;
|
|
16
|
+
};
|
|
17
|
+
toggleTabbable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function DragHandle({ rowId, title, blocked, tabbable, props }: {
|
|
20
|
+
rowId: string;
|
|
21
|
+
title: string;
|
|
22
|
+
} & NonNullable<RowLeadProps['drag']>): React.JSX.Element;
|
|
23
|
+
export declare function RowLead({ rowId, title, drag, dragSpace, tree, toggleTabbable }: RowLeadProps): React.JSX.Element;
|
|
@@ -9,6 +9,7 @@ export interface RowMenuRequest {
|
|
|
9
9
|
columnKey: string | null;
|
|
10
10
|
touch: boolean;
|
|
11
11
|
alignRight?: boolean;
|
|
12
|
+
anchorHeight?: number;
|
|
12
13
|
}
|
|
13
14
|
export interface RowPressOptions<R> {
|
|
14
15
|
canOpen: boolean;
|
|
@@ -21,6 +22,7 @@ export interface RowPressOptions<R> {
|
|
|
21
22
|
onToggle: (row: R) => void;
|
|
22
23
|
onMenu: (row: R, at: RowMenuRequest) => void;
|
|
23
24
|
onOtherClick?: (row: R) => void;
|
|
25
|
+
ownsLongPress?: (target: EventTarget | null) => boolean;
|
|
24
26
|
}
|
|
25
27
|
export interface RowPressHandlers {
|
|
26
28
|
onMouseDown: (e: React.MouseEvent) => void;
|