@dcs-tech/ui 0.10.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 +362 -0
- package/README.md +3 -2
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/ChartImageMenu-sB2QNQzd.js +9673 -0
- package/dist/ChartView-BstZkP1g.js +1942 -0
- package/dist/{SummaryChart-i6fOdrDM.js → SummaryChart-B5ibDNOZ.js} +11 -10
- package/dist/{SummaryImage-CCt5ozD9.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-74XDBcVF.js → columnValue-BOn9NC8X.js} +86 -79
- package/dist/exportContext-CMzuzRjc.js +274 -0
- package/dist/{exportEngine-BmDly7iw.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-DG134nYI.js → geometry-CFS5If1N.js} +769 -466
- package/dist/index.js +21095 -12669
- package/dist/{labels-BPItSeRU.js → labels-mukFhYkc.js} +124 -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-BiQYJbYZ.js → summaryChartData-D15kw64n.js} +6 -5
- 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 +3 -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 +2 -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/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/TableToolbar.d.ts +20 -1
- package/dist/types/components/DataTable/TableView.d.ts +18 -2
- package/dist/types/components/DataTable/cards/CardView.d.ts +25 -5
- 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/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 +128 -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 +272 -4
- package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -4
- package/dist/types/components/DataTable/useTable.d.ts +13 -1
- package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +1 -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/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/Popover/Popover.d.ts +1 -0
- package/dist/types/components/Popover/floatingPosition.d.ts +22 -2
- package/dist/types/components/ReorderList/ReorderList.d.ts +2 -1
- 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/UIProvider/UILabelsContext.d.ts +34 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +2 -0
- package/dist/types/core/hooks/index.d.ts +1 -1
- 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/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/dropdownSide.logic.d.ts +19 -0
- package/dist/types/core/logic/eventCalendar.logic.d.ts +225 -0
- 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/index.d.ts +16 -0
- package/dist/types/core/logic/pivot.logic.d.ts +100 -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/eventCalendar.types.d.ts +18 -0
- package/dist/types/core/types/fileEngine.types.d.ts +6 -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/index.d.ts +7 -0
- package/package.json +4 -4
- package/dist/ChartImageMenu-3OfqNFyt.js +0 -1510
- package/dist/ChartView-n4G5_2ro.js +0 -1707
- package/dist/SummarySeeAll-BY8knsRe.js +0 -101
- package/dist/assets/fileTask.worker--Q3rI3Bn.js +0 -1
- package/dist/exportContext-C52ZuHd8.js +0 -166
- package/dist/scrollArea-D84Cwm4o.js +0 -310
|
@@ -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,9 +78,9 @@ function r(e) {
|
|
|
77
78
|
case "breakdown": return n(e, e.buckets ?? []);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
var i = (
|
|
81
|
-
let a =
|
|
82
|
-
return a.kind === "funnel" &&
|
|
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 ? {
|
|
83
84
|
...a,
|
|
84
85
|
showChange: !1
|
|
85
86
|
} : a;
|
|
@@ -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,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 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;
|
|
9
10
|
showChange?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare function Funnel({ steps, ariaLabel, title, compact, showChange, 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;
|
|
@@ -57,6 +58,7 @@ export type ChartImageChart = {
|
|
|
57
58
|
previous?: number;
|
|
58
59
|
good?: TrendGood;
|
|
59
60
|
slot?: ChartColor;
|
|
61
|
+
figures?: ChartNumberFigure[];
|
|
60
62
|
};
|
|
61
63
|
export interface ChartImage {
|
|
62
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;
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { type DataTableActiveFilter, type DataTableColumnPinning, type DataTableDisplayPrefs, type DataTableQuickFilter, type DataTableQuickFilterMode, type DataTableSavedFilter, type DataTableLayout, type DataTableToolbarAction } 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;
|
|
5
16
|
appActions?: DataTableToolbarAction[];
|
|
@@ -38,6 +49,10 @@ interface TableToolbarProps {
|
|
|
38
49
|
onToggle: () => void;
|
|
39
50
|
};
|
|
40
51
|
groupNode?: ReactNode;
|
|
52
|
+
groupLabel?: string;
|
|
53
|
+
groupActive?: boolean;
|
|
54
|
+
pivotNode?: ReactNode;
|
|
55
|
+
pivotActive?: boolean;
|
|
41
56
|
sortingEnabled: boolean;
|
|
42
57
|
exportNode?: ReactNode;
|
|
43
58
|
columnModalOpen: boolean;
|
|
@@ -45,6 +60,7 @@ interface TableToolbarProps {
|
|
|
45
60
|
sortModalOpen: boolean;
|
|
46
61
|
setSortModalOpen: (open: boolean) => void;
|
|
47
62
|
columns: any[];
|
|
63
|
+
sortColumns?: any[];
|
|
48
64
|
sorting: Array<{
|
|
49
65
|
id: string;
|
|
50
66
|
desc: boolean;
|
|
@@ -59,9 +75,12 @@ interface TableToolbarProps {
|
|
|
59
75
|
columnVisibility: Record<string, boolean>;
|
|
60
76
|
setColumnVisibility: (vis: Record<string, boolean>) => void;
|
|
61
77
|
resetColumns: () => void;
|
|
78
|
+
columnGroups?: DataTableColumnGroup[];
|
|
62
79
|
pinning?: DataTableColumnPinning;
|
|
63
80
|
onPinningChange?: (pinning: DataTableColumnPinning) => void;
|
|
64
81
|
hasActions?: boolean;
|
|
82
|
+
cardActionsOffered?: boolean;
|
|
83
|
+
inlineActions?: number;
|
|
65
84
|
displayPrefs: DataTableDisplayPrefs;
|
|
66
85
|
onDisplayPrefsChange: (settings: DataTableDisplayPrefs) => void;
|
|
67
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;
|
|
@@ -24,7 +25,7 @@ interface TableViewProps {
|
|
|
24
25
|
onColumnFilter?: (columnId: string, anchor: HTMLElement) => void;
|
|
25
26
|
activeFilters?: DataTableActiveFilter[];
|
|
26
27
|
filteringEnabled?: boolean;
|
|
27
|
-
changedCells?:
|
|
28
|
+
changedCells?: ReadonlyMap<string, ReadonlyMap<string, CellChange>>;
|
|
28
29
|
rowKey?: string;
|
|
29
30
|
displayPrefs?: DataTableDisplayPrefs;
|
|
30
31
|
error?: unknown;
|
|
@@ -57,6 +58,21 @@ interface TableViewProps {
|
|
|
57
58
|
};
|
|
58
59
|
virtual?: VirtualOptions | null;
|
|
59
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;
|
|
60
76
|
}
|
|
61
77
|
declare const TableView: React.FC<TableViewProps>;
|
|
62
78
|
export default TableView;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import type { RowPressHandlers } from '../rows/rowPress';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RowParts } from './rowParts';
|
|
4
4
|
import { type ScrollApi, type VirtualOptions } from '../virtual/useVirtualLines';
|
|
5
|
+
import { type MotionItem } from '../motion/useRowMotion';
|
|
6
|
+
import type { RowChangesOptions } from '../motion/rowChanges';
|
|
5
7
|
export interface CardRow {
|
|
6
8
|
id: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
original: unknown;
|
|
10
|
+
index: number;
|
|
9
11
|
selected: boolean;
|
|
10
12
|
selectable: boolean;
|
|
11
13
|
}
|
|
14
|
+
export declare function useRowLines(rows: CardRow[], linesProp: CardLine[] | undefined): CardLine[];
|
|
15
|
+
export declare function withoutLeavingLines(items: Array<MotionItem<CardLine>>): Array<MotionItem<CardLine>>;
|
|
16
|
+
export declare function useKeyOrder<L>(lines: L[], keyOf: (line: L | undefined, at: number) => string): object;
|
|
12
17
|
export type CardLine = {
|
|
13
18
|
kind: 'row';
|
|
14
19
|
key: string;
|
|
@@ -20,12 +25,13 @@ export type CardLine = {
|
|
|
20
25
|
level: number;
|
|
21
26
|
expanded?: boolean;
|
|
22
27
|
};
|
|
23
|
-
export interface MotionOptions {
|
|
28
|
+
export interface MotionOptions extends Partial<RowChangesOptions> {
|
|
24
29
|
enabled: boolean;
|
|
25
30
|
resetKey: string | undefined;
|
|
26
31
|
}
|
|
27
32
|
interface CardViewProps {
|
|
28
33
|
rows: CardRow[];
|
|
34
|
+
partsOf: (row: CardRow) => RowParts;
|
|
29
35
|
lines?: CardLine[];
|
|
30
36
|
checkboxes: boolean;
|
|
31
37
|
onToggle: (id: string) => void;
|
|
@@ -40,11 +46,25 @@ interface CardViewProps {
|
|
|
40
46
|
virtual?: VirtualOptions | null;
|
|
41
47
|
scrollApi?: React.MutableRefObject<ScrollApi | null>;
|
|
42
48
|
motion?: MotionOptions;
|
|
49
|
+
renderLead?: (id: string) => ReactNode;
|
|
43
50
|
}
|
|
44
51
|
export declare function CardContent({ parts, open }: {
|
|
45
52
|
parts: RowParts;
|
|
46
53
|
open: boolean;
|
|
47
54
|
}): React.JSX.Element;
|
|
55
|
+
interface CardChunk {
|
|
56
|
+
key: string;
|
|
57
|
+
lines: Array<MotionItem<CardLine>>;
|
|
58
|
+
}
|
|
59
|
+
interface CardChunks {
|
|
60
|
+
list: CardChunk[];
|
|
61
|
+
order: object;
|
|
62
|
+
shown: Array<MotionItem<CardLine>>;
|
|
63
|
+
perLine: number;
|
|
64
|
+
chunkOf: Int32Array;
|
|
65
|
+
placeIn: Int32Array;
|
|
66
|
+
}
|
|
67
|
+
export declare function chunkLines(shown: Array<MotionItem<CardLine>>, perLine: number, before: CardChunks | null): CardChunks;
|
|
48
68
|
export declare function cardsPerLine(width: number, minCard: number, gap?: number): number;
|
|
49
|
-
export declare function CardView({ rows, lines: linesProp, checkboxes, onToggle, press, renderActions, allExpanded, minCardWidth, focusable, activeKey, placeholder, loading, virtual, scrollApi, motion }: CardViewProps): React.JSX.Element;
|
|
69
|
+
export declare function CardView({ rows, partsOf, lines: linesProp, checkboxes, onToggle, press, renderActions, allExpanded, minCardWidth, focusable, activeKey, placeholder, loading, virtual, scrollApi, motion, renderLead }: CardViewProps): React.JSX.Element;
|
|
50
70
|
export default CardView;
|
|
@@ -34,5 +34,6 @@ export declare function RowAvatar({ text, size }: {
|
|
|
34
34
|
}): React.JSX.Element;
|
|
35
35
|
export declare function rowParts<T>(row: T, index: number, fields: DataTableCardFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>, labels: CellTextLabels): RowParts;
|
|
36
36
|
export declare function listParts<T>(row: T, index: number, fields: DataTableListFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>, labels: CellTextLabels): ListParts;
|
|
37
|
+
export declare function partsCache<T, P>(build: (row: T, index: number) => P): (row: T, index: number) => P;
|
|
37
38
|
export declare function sampleRowParts<T>(fields: DataTableCardFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>): RowParts;
|
|
38
39
|
export declare function sampleListParts<T>(fields: DataTableListFields, byKey: Map<string, DataTableColumn<T>>, avatar: AvatarOption<T>): ListParts;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CellRangeFigureId } from '../../../core/logic';
|
|
3
|
+
import type { CellRangeStore } from './cellRangeStore';
|
|
4
|
+
import type { CellRangeSummary } from './useCellSelection';
|
|
5
|
+
import './cellSelection.css';
|
|
6
|
+
interface CellRangeBarProps {
|
|
7
|
+
store: CellRangeStore;
|
|
8
|
+
summary: (limit?: number) => CellRangeSummary | null | 'large';
|
|
9
|
+
figures: CellRangeFigureId[];
|
|
10
|
+
rowsVersion: unknown;
|
|
11
|
+
onCopy?: () => void;
|
|
12
|
+
onClear: () => void;
|
|
13
|
+
onMenu?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CellRangeBar: React.NamedExoticComponent<CellRangeBarProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface RangeCorner {
|
|
2
|
+
row: string;
|
|
3
|
+
col: string;
|
|
4
|
+
}
|
|
5
|
+
export interface StoredRange {
|
|
6
|
+
start: RangeCorner;
|
|
7
|
+
end: RangeCorner;
|
|
8
|
+
}
|
|
9
|
+
export type RangePhase = 'drag' | 'done';
|
|
10
|
+
export interface CellRangeStore {
|
|
11
|
+
get: () => readonly StoredRange[];
|
|
12
|
+
phase: () => RangePhase;
|
|
13
|
+
touch: () => boolean;
|
|
14
|
+
set: (ranges: readonly StoredRange[], phase: RangePhase, touch?: boolean) => void;
|
|
15
|
+
subscribe: (fn: (phase: RangePhase) => void) => () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const sameCorner: (a: RangeCorner, b: RangeCorner) => boolean;
|
|
18
|
+
export declare function createCellRangeStore(): CellRangeStore;
|