@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,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { G as e, jt as t } from "./geometry-CFS5If1N.js";
|
|
3
3
|
// src/components/DataTable/summary/summaryChartData.ts
|
|
4
4
|
function n(e, t) {
|
|
5
5
|
return {
|
|
@@ -37,7 +37,8 @@ function r(e) {
|
|
|
37
37
|
})),
|
|
38
38
|
previous: e.trend.previous,
|
|
39
39
|
good: e.card.trend?.good
|
|
40
|
-
} : {}
|
|
40
|
+
} : {},
|
|
41
|
+
...e.figures ? { figures: e.figures } : {}
|
|
41
42
|
};
|
|
42
43
|
case "ratio": return {
|
|
43
44
|
type: "part",
|
|
@@ -77,5 +78,11 @@ function r(e) {
|
|
|
77
78
|
case "breakdown": return n(e, e.buckets ?? []);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
var i = (
|
|
81
|
+
var i = (e) => t(e.card), a = (t, n) => {
|
|
82
|
+
let a = e(r(t), i(t), n);
|
|
83
|
+
return a.kind === "funnel" && t.kind === "funnel" && t.card.showChange === !1 ? {
|
|
84
|
+
...a,
|
|
85
|
+
showChange: !1
|
|
86
|
+
} : a;
|
|
87
|
+
};
|
|
81
88
|
export { a as n, i as r, n as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AlertTone } from '../../core/logic';
|
|
3
|
+
export interface AlertProps {
|
|
4
|
+
tone?: AlertTone;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode | false;
|
|
8
|
+
action?: React.ReactNode;
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
banner?: boolean;
|
|
11
|
+
role?: React.AriaRole;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
declare const Alert: React.FC<AlertProps>;
|
|
16
|
+
export default Alert;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type CardVariant = 'outlined' | 'elevated' | 'flat';
|
|
3
3
|
export type CardPadding = 'none' | 'small' | 'medium';
|
|
4
|
-
export
|
|
4
|
+
export type CardHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
export interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'children' | 'onClick'> {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
variant?: CardVariant;
|
|
7
8
|
padding?: CardPadding;
|
|
8
9
|
title?: React.ReactNode;
|
|
10
|
+
headingLevel?: CardHeadingLevel | 'none';
|
|
9
11
|
subtitle?: React.ReactNode;
|
|
10
12
|
action?: React.ReactNode;
|
|
11
13
|
footer?: React.ReactNode;
|
|
12
14
|
onClick?: () => void;
|
|
13
|
-
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
+
selected?: boolean;
|
|
15
16
|
}
|
|
16
17
|
declare const Card: React.FC<CardProps>;
|
|
17
18
|
export default Card;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Card } from './Card';
|
|
2
|
-
export type { CardProps, CardVariant, CardPadding } from './Card';
|
|
2
|
+
export type { CardProps, CardVariant, CardPadding, CardHeadingLevel } from './Card';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartDatum, ChartFormatProps, ChartLinkComponent, ChartSelectProps, ChartSeries } from './types';
|
|
4
|
-
export interface BarListProps extends ChartFormatProps, ChartSelectProps<ChartDatum
|
|
5
|
+
export interface BarListProps extends ChartFormatProps, ChartSelectProps<ChartDatum>, ChartMotionProps {
|
|
5
6
|
data: ChartDatum[];
|
|
6
7
|
series: ChartSeries[];
|
|
7
8
|
ariaLabel: string;
|
|
@@ -9,4 +10,4 @@ export interface BarListProps extends ChartFormatProps, ChartSelectProps<ChartDa
|
|
|
9
10
|
linkAs?: ChartLinkComponent;
|
|
10
11
|
compact?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function BarList({ data, series, ariaLabel, title, linkAs: LinkAs, compact, onSelect, selected, ...format }: BarListProps): import("react").JSX.Element;
|
|
13
|
+
export declare function BarList({ data, series, ariaLabel, title, linkAs: LinkAs, compact, onSelect, selected, animate, animationDuration, ...format }: BarListProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartFormatProps } from './types';
|
|
4
5
|
export interface CalendarDay {
|
|
5
6
|
day: string;
|
|
6
7
|
count: number;
|
|
7
8
|
}
|
|
8
|
-
export interface CalendarHeatmapProps extends ChartFormatProps {
|
|
9
|
+
export interface CalendarHeatmapProps extends ChartFormatProps, ChartMotionProps {
|
|
9
10
|
days: CalendarDay[];
|
|
10
11
|
ariaLabel: string;
|
|
11
12
|
title?: ReactNode;
|
|
@@ -13,5 +14,6 @@ export interface CalendarHeatmapProps extends ChartFormatProps {
|
|
|
13
14
|
selected?: string | null;
|
|
14
15
|
compact?: boolean;
|
|
15
16
|
}
|
|
17
|
+
export declare function heatShade(level: number): string;
|
|
16
18
|
export declare const weekdayNames: (locale?: string) => string[];
|
|
17
|
-
export declare function CalendarHeatmap({ days, ariaLabel, title, onSelect, selected, compact, ...format }: CalendarHeatmapProps): import("react").JSX.Element;
|
|
19
|
+
export declare function CalendarHeatmap({ days, ariaLabel, title, onSelect, selected, compact, animate, animationDuration, ...format }: CalendarHeatmapProps): import("react").JSX.Element;
|
|
@@ -2,7 +2,8 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import './Charts.css';
|
|
3
3
|
import { type ChartData, type ChartKind } from './chartData';
|
|
4
4
|
import type { ChartFormatProps, ChartLinkComponent } from './types';
|
|
5
|
-
|
|
5
|
+
import type { ChartMotionProps } from './useChartMotion';
|
|
6
|
+
export interface ChartProps extends ChartFormatProps, ChartMotionProps {
|
|
6
7
|
data: ChartData;
|
|
7
8
|
as?: ChartKind;
|
|
8
9
|
offer?: readonly ChartKind[];
|
|
@@ -17,4 +18,4 @@ export interface ChartProps extends ChartFormatProps {
|
|
|
17
18
|
legend?: boolean;
|
|
18
19
|
onChartChange?: (kind: ChartKind) => void;
|
|
19
20
|
}
|
|
20
|
-
export declare function Chart({ data, as, offer, ariaLabel, title, compact, height, size, onSelect, selected, linkAs, onChartChange, legend, ...format }: ChartProps): import("react").JSX.Element;
|
|
21
|
+
export declare function Chart({ data, as, offer, ariaLabel, title, compact, height, size, onSelect, selected, linkAs, onChartChange, legend, animate, animationDuration, ...format }: ChartProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ChartImageChart } from './chartImage';
|
|
2
2
|
import type { ChartFormatProps, ChartLinkComponent } from './types';
|
|
3
|
-
|
|
3
|
+
import type { ChartMotionProps } from './useChartMotion';
|
|
4
|
+
export interface ChartViewProps extends ChartFormatProps, ChartMotionProps {
|
|
4
5
|
chart: ChartImageChart;
|
|
5
6
|
ariaLabel: string;
|
|
6
7
|
compact?: boolean;
|
|
@@ -12,4 +13,4 @@ export interface ChartViewProps extends ChartFormatProps {
|
|
|
12
13
|
legend?: boolean;
|
|
13
14
|
onLegendCut?: (hidden: number) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare function ChartView({ chart, ariaLabel, compact, height, size, onSelect, selected, linkAs, onLegendCut, legend, ...format }: ChartViewProps): import("react").JSX.Element;
|
|
16
|
+
export declare function ChartView({ chart, ariaLabel, compact, height, size, onSelect, selected, linkAs, onLegendCut, legend, animate, animationDuration, ...format }: ChartViewProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
3
|
import { type ColumnMode } from './geometry';
|
|
4
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
4
5
|
import type { ChartDatum, ChartFormatProps, ChartSelectProps, ChartSeries } from './types';
|
|
5
|
-
export interface ColumnChartProps extends ChartFormatProps, ChartSelectProps<ChartDatum
|
|
6
|
+
export interface ColumnChartProps extends ChartFormatProps, ChartSelectProps<ChartDatum>, ChartMotionProps {
|
|
6
7
|
data: ChartDatum[];
|
|
7
8
|
series: ChartSeries[];
|
|
8
9
|
ariaLabel: string;
|
|
@@ -12,4 +13,4 @@ export interface ColumnChartProps extends ChartFormatProps, ChartSelectProps<Cha
|
|
|
12
13
|
mode?: ColumnMode;
|
|
13
14
|
legend?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare function ColumnChart({ data, series, ariaLabel, title, height, compact, mode, legend, onSelect, selected, ...format }: ColumnChartProps): import("react").JSX.Element;
|
|
16
|
+
export declare function ColumnChart({ data, series, ariaLabel, title, height, compact, mode, legend, onSelect, selected, animate, animationDuration, ...format }: ColumnChartProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartFormatProps, ChartSelectProps, ChartSlice } from './types';
|
|
4
|
-
export interface DonutProps extends ChartFormatProps, ChartSelectProps<ChartSlice
|
|
5
|
+
export interface DonutProps extends ChartFormatProps, ChartSelectProps<ChartSlice>, ChartMotionProps {
|
|
5
6
|
slices: ChartSlice[];
|
|
6
7
|
ariaLabel: string;
|
|
7
8
|
title?: ReactNode;
|
|
@@ -11,4 +12,4 @@ export interface DonutProps extends ChartFormatProps, ChartSelectProps<ChartSlic
|
|
|
11
12
|
onLegendCut?: (hidden: number) => void;
|
|
12
13
|
legend?: boolean;
|
|
13
14
|
}
|
|
14
|
-
export declare function Donut({ slices, ariaLabel, title, size, compact, variant, onLegendCut, legend, onSelect, selected, ...format }: DonutProps): import("react").JSX.Element;
|
|
15
|
+
export declare function Donut({ slices, ariaLabel, title, size, compact, variant, onLegendCut, legend, onSelect, selected, animate, animationDuration, ...format }: DonutProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartFormatProps, ChartSelectProps, ChartSlice } from './types';
|
|
4
|
-
export interface FunnelProps extends ChartFormatProps, ChartSelectProps<ChartSlice
|
|
5
|
+
export interface FunnelProps extends ChartFormatProps, ChartSelectProps<ChartSlice>, ChartMotionProps {
|
|
5
6
|
steps: ChartSlice[];
|
|
6
7
|
ariaLabel: string;
|
|
7
8
|
title?: ReactNode;
|
|
8
9
|
compact?: boolean;
|
|
10
|
+
showChange?: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare function Funnel({ steps, ariaLabel, title, compact, onSelect, selected, ...format }: FunnelProps): import("react").JSX.Element;
|
|
12
|
+
export declare function Funnel({ steps, ariaLabel, title, compact, showChange, onSelect, selected, animate, animationDuration, ...format }: FunnelProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
3
|
import { type GaugeVariant } from './geometry';
|
|
4
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
4
5
|
import type { ChartFormatProps, ChartProgressColor } from './types';
|
|
5
|
-
export interface GaugeProps extends ChartFormatProps {
|
|
6
|
+
export interface GaugeProps extends ChartFormatProps, ChartMotionProps {
|
|
6
7
|
value: number;
|
|
7
8
|
total: number;
|
|
8
9
|
ariaLabel: string;
|
|
@@ -12,4 +13,4 @@ export interface GaugeProps extends ChartFormatProps {
|
|
|
12
13
|
size?: number;
|
|
13
14
|
compact?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare function Gauge({ value, total, ariaLabel, label, variant, color, size, compact, ...format }: GaugeProps): import("react").JSX.Element;
|
|
16
|
+
export declare function Gauge({ value, total, ariaLabel, label, variant, color, size, compact, animate, animationDuration, ...format }: GaugeProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartDatum, ChartFormatProps, ChartSelectProps, ChartSeries } from './types';
|
|
4
|
-
export interface LineChartProps extends ChartFormatProps, ChartSelectProps<ChartDatum
|
|
5
|
+
export interface LineChartProps extends ChartFormatProps, ChartSelectProps<ChartDatum>, ChartMotionProps {
|
|
5
6
|
data: ChartDatum[];
|
|
6
7
|
series: ChartSeries[];
|
|
7
8
|
ariaLabel: string;
|
|
@@ -10,4 +11,4 @@ export interface LineChartProps extends ChartFormatProps, ChartSelectProps<Chart
|
|
|
10
11
|
height?: number;
|
|
11
12
|
compact?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare function LineChart({ data, series, ariaLabel, title, area, height, compact, onSelect, selected, ...format }: LineChartProps): import("react").JSX.Element;
|
|
14
|
+
export declare function LineChart({ data, series, ariaLabel, title, area, height, compact, onSelect, selected, animate, animationDuration, ...format }: LineChartProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
3
|
import { type TrendGood } from './geometry';
|
|
4
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
4
5
|
import type { ChartColor, ChartFormatProps } from './types';
|
|
5
6
|
export interface NumberTrendPoint {
|
|
6
7
|
key?: string;
|
|
7
8
|
label: string;
|
|
8
9
|
value: number;
|
|
9
10
|
}
|
|
10
|
-
export interface NumberTrendProps extends ChartFormatProps {
|
|
11
|
+
export interface NumberTrendProps extends ChartFormatProps, ChartMotionProps {
|
|
11
12
|
value: number;
|
|
12
13
|
ariaLabel: string;
|
|
13
14
|
title?: ReactNode;
|
|
@@ -18,4 +19,4 @@ export interface NumberTrendProps extends ChartFormatProps {
|
|
|
18
19
|
slot?: ChartColor;
|
|
19
20
|
compact?: boolean;
|
|
20
21
|
}
|
|
21
|
-
export declare function NumberTrend({ value, ariaLabel, title, points, current, previous, good, slot, compact, ...format }: NumberTrendProps): import("react").JSX.Element;
|
|
22
|
+
export declare function NumberTrend({ value, ariaLabel, title, points, current, previous, good, slot, compact, animate, animationDuration, ...format }: NumberTrendProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartFormatProps, ChartProgressColor } from './types';
|
|
4
|
-
export interface ProgressProps extends ChartFormatProps {
|
|
5
|
+
export interface ProgressProps extends ChartFormatProps, ChartMotionProps {
|
|
5
6
|
value: number;
|
|
6
7
|
total: number;
|
|
7
8
|
ariaLabel: string;
|
|
@@ -9,4 +10,4 @@ export interface ProgressProps extends ChartFormatProps {
|
|
|
9
10
|
color?: ChartProgressColor;
|
|
10
11
|
compact?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function Progress({ value, total, ariaLabel, label, color, compact, ...format }: ProgressProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Progress({ value, total, ariaLabel, label, color, compact, animate, animationDuration, ...format }: ProgressProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
3
4
|
import type { ChartFormatProps, ChartSelectProps, ChartSlice } from './types';
|
|
4
|
-
export interface StackedBarProps extends ChartFormatProps, ChartSelectProps<ChartSlice
|
|
5
|
+
export interface StackedBarProps extends ChartFormatProps, ChartSelectProps<ChartSlice>, ChartMotionProps {
|
|
5
6
|
slices: ChartSlice[];
|
|
6
7
|
ariaLabel: string;
|
|
7
8
|
title?: ReactNode;
|
|
8
9
|
compact?: boolean;
|
|
9
10
|
onLegendCut?: (hidden: number) => void;
|
|
10
11
|
}
|
|
11
|
-
export declare function StackedBar({ slices, ariaLabel, title, compact, onLegendCut, onSelect, selected, ...format }: StackedBarProps): import("react").JSX.Element;
|
|
12
|
+
export declare function StackedBar({ slices, ariaLabel, title, compact, onLegendCut, onSelect, selected, animate, animationDuration, ...format }: StackedBarProps): import("react").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import './Charts.css';
|
|
3
3
|
import { type TreemapNode } from './geometry';
|
|
4
|
+
import { type ChartMotionProps } from './useChartMotion';
|
|
4
5
|
import type { ChartFormatProps, ChartSelectProps } from './types';
|
|
5
|
-
export interface TreemapProps extends ChartFormatProps, ChartSelectProps<TreemapNode
|
|
6
|
+
export interface TreemapProps extends ChartFormatProps, ChartSelectProps<TreemapNode>, ChartMotionProps {
|
|
6
7
|
nodes: TreemapNode[];
|
|
7
8
|
ariaLabel: string;
|
|
8
9
|
title?: ReactNode;
|
|
9
10
|
height?: number;
|
|
10
11
|
compact?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function Treemap({ nodes, ariaLabel, title, height, compact, onSelect, selected, ...format }: TreemapProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Treemap({ nodes, ariaLabel, title, height, compact, onSelect, selected, animate, animationDuration, ...format }: TreemapProps): import("react").JSX.Element;
|
|
@@ -32,6 +32,11 @@ export interface ChartStepCount {
|
|
|
32
32
|
slot?: ChartColor;
|
|
33
33
|
selectable?: boolean;
|
|
34
34
|
}
|
|
35
|
+
export interface ChartNumberFigure {
|
|
36
|
+
label: string;
|
|
37
|
+
value: number | null;
|
|
38
|
+
text?: (formatted: string) => string;
|
|
39
|
+
}
|
|
35
40
|
export type ChartData = {
|
|
36
41
|
type: 'values';
|
|
37
42
|
values: ChartValueCount[];
|
|
@@ -60,6 +65,7 @@ export type ChartData = {
|
|
|
60
65
|
}>;
|
|
61
66
|
previous?: number;
|
|
62
67
|
good?: TrendGood;
|
|
68
|
+
figures?: ChartNumberFigure[];
|
|
63
69
|
};
|
|
64
70
|
export type ChartKind = 'donut' | 'pie' | 'bars' | 'stacked' | 'treemap' | 'columns' | 'line' | 'area' | 'grouped' | 'calendar' | 'bar' | 'gauge' | 'ring' | 'funnel' | 'number' | 'numberTrend';
|
|
65
71
|
export declare function chartsFor(data: ChartData): ChartKind[];
|
|
@@ -2,6 +2,7 @@ import { type ChartLabels } from './labels';
|
|
|
2
2
|
import { type GaugeVariant, type TreemapNode, type ColumnMode, type TrendGood } from './geometry';
|
|
3
3
|
import type { ChartDatum, ChartProgressColor, ChartSeries, ChartSlice, ChartColor } from './types';
|
|
4
4
|
import type { NumberTrendPoint } from './NumberTrend';
|
|
5
|
+
import type { ChartNumberFigure } from './chartData';
|
|
5
6
|
import type { CalendarDay } from './CalendarHeatmap';
|
|
6
7
|
export interface ChartImageProgressRow {
|
|
7
8
|
label: string;
|
|
@@ -44,6 +45,7 @@ export type ChartImageChart = {
|
|
|
44
45
|
} | {
|
|
45
46
|
kind: 'funnel';
|
|
46
47
|
steps: ChartSlice[];
|
|
48
|
+
showChange?: boolean;
|
|
47
49
|
} | {
|
|
48
50
|
kind: 'gauge';
|
|
49
51
|
rows: ChartImageProgressRow[];
|
|
@@ -56,6 +58,7 @@ export type ChartImageChart = {
|
|
|
56
58
|
previous?: number;
|
|
57
59
|
good?: TrendGood;
|
|
58
60
|
slot?: ChartColor;
|
|
61
|
+
figures?: ChartNumberFigure[];
|
|
59
62
|
};
|
|
60
63
|
export interface ChartImage {
|
|
61
64
|
report?: string;
|
|
@@ -10,6 +10,9 @@ export interface DonutArc {
|
|
|
10
10
|
start: number;
|
|
11
11
|
length: number;
|
|
12
12
|
}
|
|
13
|
+
export declare const drawnTotal: (slices: ReadonlyArray<{
|
|
14
|
+
value: number;
|
|
15
|
+
}>) => number;
|
|
13
16
|
export declare function donutArcs(slices: ChartSlice[]): DonutArc[];
|
|
14
17
|
export declare const sharePercent: (value: number, total: number) => number;
|
|
15
18
|
export declare function niceMax(v: number): number;
|
|
@@ -12,6 +12,7 @@ export { Gauge, type GaugeProps } from './Gauge';
|
|
|
12
12
|
export { Legend, type LegendProps } from './Legend';
|
|
13
13
|
export { LineChart, type LineChartProps } from './LineChart';
|
|
14
14
|
export { NumberTrend, type NumberTrendPoint, type NumberTrendProps } from './NumberTrend';
|
|
15
|
+
export type { ChartNumberFigure } from './chartData';
|
|
15
16
|
export { CALENDAR_DAYS_MAX, calendarGrid, dayRange, deltaTone, trendDelta, type ColumnMode, type GaugeVariant, type TrendDelta, type TrendDirection, type TrendGood } from './geometry';
|
|
16
17
|
export { Progress, type ProgressProps } from './Progress';
|
|
17
18
|
export { StackedBar, type StackedBarProps } from './StackedBar';
|
|
@@ -29,4 +30,5 @@ export { TooltipBody, hitRect, hitRects, useChartPointer, type ChartPointer, typ
|
|
|
29
30
|
export { HOLE, POINTER_GAP, angleOf, bandAt, placeAtPointer, rectAt, sliceAt, spanAt, type ChartRect, type PointerPlacement } from './pointer';
|
|
30
31
|
export { CALENDAR_CELL, calendarCellSize, calendarMonthLabels, type CalendarCellSize } from './geometry';
|
|
31
32
|
export { useBoxSize, useBoxWidth, type BoxSize } from './useBoxSize';
|
|
33
|
+
export { CHART_ANIMATION_MS, type ChartMotionProps } from './useChartMotion';
|
|
32
34
|
export type { ChartCategoricalSlot, ChartColor, ChartLevels, ChartProgressColor, ChartDatum, ChartFormatProps, ChartLinkComponent, ChartLinkProps, ChartSelectProps, ChartSeries, ChartSlice, ChartSlot, ChartStatusSlot } from './types';
|
|
@@ -65,6 +65,7 @@ export declare const CHART_LEVELS_DEFAULT: ChartLevels;
|
|
|
65
65
|
export declare const isChartLevels: (c: ChartProgressColor | undefined) => c is ChartLevels;
|
|
66
66
|
export declare function levelColor(color: ChartProgressColor, share: number): ChartColor;
|
|
67
67
|
export declare const colorCss: (c: ChartColor) => string;
|
|
68
|
+
export declare const toneTextCss: (tone: "positive" | "negative" | "neutral") => string;
|
|
68
69
|
export declare const colorHex: (c: ChartColor, scheme: ChartScheme) => string;
|
|
69
70
|
export declare const CHART_HEAT: {
|
|
70
71
|
readonly light: readonly ["#e8eff9", "#bcd3f2", "#7faee9", "#4081d2", "#155aa7"];
|
|
@@ -23,3 +23,17 @@ export declare function roveControls(key: string, index: number | null, count: n
|
|
|
23
23
|
export declare function ChartLive({ text }: {
|
|
24
24
|
text: string;
|
|
25
25
|
}): import("react").JSX.Element;
|
|
26
|
+
export interface DrawnTick {
|
|
27
|
+
value: number;
|
|
28
|
+
alpha: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function AxisY({ ticks, max, plot, nf }: {
|
|
31
|
+
ticks: readonly DrawnTick[];
|
|
32
|
+
max: number;
|
|
33
|
+
plot: number;
|
|
34
|
+
nf: (n: number) => string;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
export declare function Gridlines({ ticks, max }: {
|
|
37
|
+
ticks: readonly DrawnTick[];
|
|
38
|
+
max: number;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TweenValues } from '../../core/logic';
|
|
2
|
+
export declare const CHART_ANIMATION_MS: 300;
|
|
3
|
+
export interface ChartMotionProps {
|
|
4
|
+
animate?: boolean;
|
|
5
|
+
animationDuration?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function useReducedMotion(): boolean;
|
|
8
|
+
export declare function useChartTween(target: TweenValues, { animate, animationDuration }?: ChartMotionProps, hold?: (name: string) => boolean): TweenValues;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CommandPaletteTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'type'> {
|
|
3
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
label?: string;
|
|
5
|
+
hotkey?: string | null;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const CommandPaletteTrigger: React.ForwardRefExoticComponent<CommandPaletteTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export default CommandPaletteTrigger;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as CommandPalette } from './CommandPalette';
|
|
2
2
|
export type { CommandPaletteProps, CommandPaletteItem } from './CommandPalette';
|
|
3
|
+
export { default as CommandPaletteTrigger } from './CommandPaletteTrigger';
|
|
4
|
+
export type { CommandPaletteTriggerProps } from './CommandPaletteTrigger';
|
|
@@ -5,6 +5,8 @@ import './DataTable.css';
|
|
|
5
5
|
import './DataTable.container.css';
|
|
6
6
|
import './DataTable.features.css';
|
|
7
7
|
import './DataTable.layouts.css';
|
|
8
|
+
import './DataTable.tree.css';
|
|
9
|
+
import './DataTable.pivot.css';
|
|
8
10
|
export declare function sameSorting(a: Array<{
|
|
9
11
|
id: string;
|
|
10
12
|
desc: boolean;
|
|
@@ -12,5 +14,5 @@ export declare function sameSorting(a: Array<{
|
|
|
12
14
|
id: string;
|
|
13
15
|
desc: boolean;
|
|
14
16
|
}>): boolean;
|
|
15
|
-
declare function DataTable<TData = any>({ data: dataProp, views, tableId, className, dataSource, persistence: persistenceProp, authorize, exportOptions, initialState: initialStateProp, onStateChange, onRowsChange, apiRef, bulkActions: tableBulkActions, labels: labelsProp, locale: localeProp, renderDetail: tableRenderDetail, detailBar, openRowId: openRowIdProp, onOpenRowChange, shortcuts: tableShortcutsProp, sharing, renamedViews, prefsVersion, migratePrefs, title, }: DataTableProps<TData>): React.JSX.Element;
|
|
17
|
+
declare function DataTable<TData = any>({ data: dataProp, views, tableId, className, dataSource, persistence: persistenceProp, authorize, exportOptions, initialState: initialStateProp, onStateChange, onRowsChange, apiRef, bulkActions: tableBulkActions, labels: labelsProp, locale: localeProp, renderDetail: tableRenderDetail, detailBar, openRowId: openRowIdProp, onOpenRowChange, onRowOrderChange, shortcuts: tableShortcutsProp, sharing, renamedViews, prefsVersion, migratePrefs, title, pinnedRows: appPinnedRows, pivot: pivotProp, onPivotChange, }: DataTableProps<TData>): React.JSX.Element;
|
|
16
18
|
export default DataTable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type DataTableColumn, type DataTableDisplayPrefs, type DataTableColumnPinning } from './types';
|
|
2
|
+
import { type DataTableColumn, type DataTableDisplayPrefs, type DataTableColumnPinning, type DataTableColumnGroup } from './types';
|
|
3
3
|
interface TableColumnModalProps {
|
|
4
4
|
columns: DataTableColumn[];
|
|
5
5
|
columnOrder: string[];
|
|
@@ -7,10 +7,13 @@ interface TableColumnModalProps {
|
|
|
7
7
|
columnVisibility: Record<string, boolean>;
|
|
8
8
|
setColumnVisibility: (vis: Record<string, boolean>) => void;
|
|
9
9
|
resetColumns: () => void;
|
|
10
|
+
columnGroups?: DataTableColumnGroup[];
|
|
10
11
|
pinning?: DataTableColumnPinning;
|
|
11
12
|
onPinningChange?: (pinning: DataTableColumnPinning) => void;
|
|
12
13
|
onClose: () => void;
|
|
13
14
|
hasActions?: boolean;
|
|
15
|
+
cardActionsOffered?: boolean;
|
|
16
|
+
inlineActions?: number;
|
|
14
17
|
displayPrefs?: DataTableDisplayPrefs;
|
|
15
18
|
onDisplayPrefsChange?: (settings: DataTableDisplayPrefs) => void;
|
|
16
19
|
}
|
|
@@ -10,7 +10,7 @@ export interface TablePager {
|
|
|
10
10
|
setPageSize: (n: number) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare function pagerOf(table: any, pager?: TablePager): TablePager;
|
|
13
|
-
export declare function pageSizeChoices(paginationConfig: DataTablePaginationConfig, allMode: boolean, pageSize: number, formatNumber: (n: number) => string, allLabel: string): {
|
|
13
|
+
export declare function pageSizeChoices(paginationConfig: DataTablePaginationConfig, allMode: boolean, pageSize: number, formatNumber: (n: number) => string, allLabel: string, defaults?: number[]): {
|
|
14
14
|
options: {
|
|
15
15
|
name: string;
|
|
16
16
|
value: string;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { type DataTableActiveFilter, type DataTableColumnPinning, type DataTableDisplayPrefs, type DataTableQuickFilter, type DataTableQuickFilterMode, type DataTableSavedFilter, type DataTableLayout } from './types';
|
|
2
|
+
import { type DataTableActiveFilter, type DataTableColumnGroup, type DataTableColumnPinning, type DataTableDisplayPrefs, type DataTableQuickFilter, type DataTableQuickFilterMode, type DataTableSavedFilter, type DataTableLayout, type DataTableToolbarAction } from './types';
|
|
3
|
+
export declare const TOOLBAR_PRIORITY: {
|
|
4
|
+
readonly sort: 10;
|
|
5
|
+
readonly filterRow: 20;
|
|
6
|
+
readonly fields: 30;
|
|
7
|
+
readonly expandAll: 40;
|
|
8
|
+
readonly group: 50;
|
|
9
|
+
readonly pivot: 60;
|
|
10
|
+
readonly select: 70;
|
|
11
|
+
readonly export: 80;
|
|
12
|
+
readonly app: 100;
|
|
13
|
+
};
|
|
3
14
|
interface TableToolbarProps {
|
|
4
15
|
phone: boolean;
|
|
16
|
+
appActions?: DataTableToolbarAction[];
|
|
5
17
|
searchEnabled: boolean;
|
|
6
18
|
globalFilter: string;
|
|
7
19
|
setGlobalFilter: (value: string) => void;
|
|
@@ -37,6 +49,10 @@ interface TableToolbarProps {
|
|
|
37
49
|
onToggle: () => void;
|
|
38
50
|
};
|
|
39
51
|
groupNode?: ReactNode;
|
|
52
|
+
groupLabel?: string;
|
|
53
|
+
groupActive?: boolean;
|
|
54
|
+
pivotNode?: ReactNode;
|
|
55
|
+
pivotActive?: boolean;
|
|
40
56
|
sortingEnabled: boolean;
|
|
41
57
|
exportNode?: ReactNode;
|
|
42
58
|
columnModalOpen: boolean;
|
|
@@ -44,6 +60,7 @@ interface TableToolbarProps {
|
|
|
44
60
|
sortModalOpen: boolean;
|
|
45
61
|
setSortModalOpen: (open: boolean) => void;
|
|
46
62
|
columns: any[];
|
|
63
|
+
sortColumns?: any[];
|
|
47
64
|
sorting: Array<{
|
|
48
65
|
id: string;
|
|
49
66
|
desc: boolean;
|
|
@@ -58,9 +75,12 @@ interface TableToolbarProps {
|
|
|
58
75
|
columnVisibility: Record<string, boolean>;
|
|
59
76
|
setColumnVisibility: (vis: Record<string, boolean>) => void;
|
|
60
77
|
resetColumns: () => void;
|
|
78
|
+
columnGroups?: DataTableColumnGroup[];
|
|
61
79
|
pinning?: DataTableColumnPinning;
|
|
62
80
|
onPinningChange?: (pinning: DataTableColumnPinning) => void;
|
|
63
81
|
hasActions?: boolean;
|
|
82
|
+
cardActionsOffered?: boolean;
|
|
83
|
+
inlineActions?: number;
|
|
64
84
|
displayPrefs: DataTableDisplayPrefs;
|
|
65
85
|
onDisplayPrefsChange: (settings: DataTableDisplayPrefs) => void;
|
|
66
86
|
table: any;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type DataTableView, type DataTableDisplayPrefs, type DataTableActiveFilter, type DataTableColumnPinning, type DataTableFilterGroup } from './types';
|
|
3
3
|
import { type CellChange } from './useDataChangeTracker';
|
|
4
|
+
import type { RowChangesOptions } from './motion/rowChanges';
|
|
4
5
|
import { type PinSide } from './pinning';
|
|
5
6
|
import { type RowPressHandlers } from './rows/rowPress';
|
|
6
|
-
import type
|
|
7
|
+
import { type DisplayItem, type TreeLineState } from './grouping/groupModel';
|
|
7
8
|
import { type ScrollApi, type VirtualOptions } from './virtual/useVirtualLines';
|
|
8
9
|
export interface TableFilterRowProps {
|
|
9
10
|
visible: boolean;
|
|
@@ -14,6 +15,7 @@ export interface TableFilterRowProps {
|
|
|
14
15
|
interface TableViewProps {
|
|
15
16
|
table: any;
|
|
16
17
|
config: DataTableView;
|
|
18
|
+
emptyText: string;
|
|
17
19
|
checkboxes: boolean;
|
|
18
20
|
toggleRowSelection: (rowId: string) => void;
|
|
19
21
|
toggleAllRowsSelection: () => void;
|
|
@@ -23,7 +25,7 @@ interface TableViewProps {
|
|
|
23
25
|
onColumnFilter?: (columnId: string, anchor: HTMLElement) => void;
|
|
24
26
|
activeFilters?: DataTableActiveFilter[];
|
|
25
27
|
filteringEnabled?: boolean;
|
|
26
|
-
changedCells?:
|
|
28
|
+
changedCells?: ReadonlyMap<string, ReadonlyMap<string, CellChange>>;
|
|
27
29
|
rowKey?: string;
|
|
28
30
|
displayPrefs?: DataTableDisplayPrefs;
|
|
29
31
|
error?: unknown;
|
|
@@ -56,6 +58,21 @@ interface TableViewProps {
|
|
|
56
58
|
};
|
|
57
59
|
virtual?: VirtualOptions | null;
|
|
58
60
|
scrollApi?: React.MutableRefObject<ScrollApi | null>;
|
|
61
|
+
rowChanges?: RowChangesOptions;
|
|
62
|
+
pinnedLines?: {
|
|
63
|
+
top: DisplayItem[];
|
|
64
|
+
bottom: DisplayItem[];
|
|
65
|
+
};
|
|
66
|
+
rowLead?: (row: any, line: RowLeadContext) => ReactNode;
|
|
67
|
+
totalsRows?: any[];
|
|
68
|
+
rowClassName?: (row: any) => string | undefined;
|
|
69
|
+
ariaLabel?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface RowLeadContext {
|
|
72
|
+
depth: number;
|
|
73
|
+
tree?: TreeLineState;
|
|
74
|
+
pinned: boolean;
|
|
75
|
+
leaving: boolean;
|
|
59
76
|
}
|
|
60
77
|
declare const TableView: React.FC<TableViewProps>;
|
|
61
78
|
export default TableView;
|