@dcs-tech/ui 0.4.0 → 0.6.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/dist/ChartImageMenu-CuuFnW9q.js +1481 -0
- package/dist/{ChartView-Cehrcr05.js → ChartView-nS4f4EU_.js} +514 -514
- package/dist/{SummaryChart-y27q_BBN.js → SummaryChart-CVg6i2mx.js} +2 -2
- package/dist/{SummaryImage-DDNEEu_K.js → SummaryImage-CoEFzMl6.js} +2 -2
- package/dist/{SummarySeeAll-0dX-_LFe.js → SummarySeeAll-C_OUs3kn.js} +5 -5
- package/dist/assets/fileTask.worker-FQSUtwcz.js +1 -0
- package/dist/columnValue-K98ElfJc.js +610 -0
- package/dist/exportContext-CJaIv8R-.js +166 -0
- package/dist/{exportEngine-DL-jEXFU.js → exportEngine-CDLYHH0d.js} +137 -133
- package/dist/fileActions-KSaVGnaE.js +144 -0
- package/dist/{geometry-CG2nOEnw.js → geometry-ChwYB45B.js} +433 -497
- package/dist/index.js +8572 -8435
- package/dist/{defaults-DL745PK1.js → labels-CnqqTrne.js} +3 -79
- package/dist/runFileTask-BClLQjmv.js +109 -0
- package/dist/scrollArea-DAlVT5U7.js +214 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-Djo73zb8.js → summaryChartData-pNvzaEHp.js} +1 -1
- package/dist/types/components/Charts/parts.d.ts +1 -1
- package/dist/types/components/Collapsible/index.d.ts +1 -1
- package/dist/types/components/DataTable/DataTable.d.ts +1 -1
- package/dist/types/components/DataTable/cards/cardFields.d.ts +2 -4
- package/dist/types/components/DataTable/columnValue.d.ts +19 -0
- package/dist/types/components/DataTable/export/exportCells.d.ts +13 -0
- package/dist/types/components/DataTable/export/exportEngine.d.ts +2 -0
- package/dist/types/components/DataTable/export/useTableExport.d.ts +2 -0
- package/dist/types/components/DataTable/host.d.ts +2 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/labels.d.ts +2 -0
- package/dist/types/components/DataTable/types.d.ts +11 -0
- package/dist/types/components/DataTable/useTable.d.ts +4 -1
- package/dist/types/components/DataTable/vendor/index.d.ts +1 -1
- package/dist/types/components/EditableTable/EditableTableCell.d.ts +1 -1
- package/dist/types/components/FileEngine/FileEngineContext.d.ts +17 -0
- package/dist/types/components/FileEngine/FileEngineProvider.d.ts +12 -0
- package/dist/types/components/FileEngine/FileJobsTray.d.ts +10 -0
- package/dist/types/components/FileEngine/index.d.ts +8 -0
- package/dist/types/components/FileEngine/labels.d.ts +29 -0
- package/dist/types/components/Toast/ToastHost.d.ts +1 -0
- package/dist/types/components/UIProvider/UIFormatContext.d.ts +7 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +116 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +6 -1
- package/dist/types/components/UIProvider/index.d.ts +4 -0
- package/dist/types/core/logic/collapsible.logic.d.ts +6 -1
- package/dist/types/core/logic/datePicker.logic.d.ts +5 -0
- package/dist/types/core/logic/exportSafety.logic.d.ts +1 -0
- package/dist/types/core/logic/fileQueue.logic.d.ts +28 -0
- package/dist/types/core/logic/format.logic.d.ts +4 -0
- package/dist/types/core/logic/index.d.ts +4 -0
- package/dist/types/core/logic/tableDate.logic.d.ts +7 -0
- package/dist/types/core/logic/tableSummary.logic.d.ts +2 -2
- package/dist/types/core/types/collapsible.types.d.ts +4 -16
- package/dist/types/core/types/fileEngine.types.d.ts +65 -0
- package/dist/types/core/types/format.types.d.ts +15 -0
- package/dist/types/core/types/index.d.ts +2 -0
- package/dist/types/core/types/table.types.d.ts +1 -0
- package/dist/types/{components/DataTable/vendor → file}/fileActions.d.ts +17 -7
- package/dist/types/file/fileEngine.d.ts +48 -0
- package/dist/types/file/tasks/fileTask.worker.d.ts +1 -0
- package/dist/types/file/tasks/runFileTask.d.ts +6 -0
- package/dist/types/file/workerPool.d.ts +17 -0
- package/dist/types/index.d.ts +9 -2
- package/package.json +1 -1
- package/dist/ChartImageMenu-HILSfn5A.js +0 -1115
- package/dist/exportContext-CdpsOzE8.js +0 -235
- package/dist/scrollArea-CkPGDYH2.js +0 -210
|
@@ -9,7 +9,7 @@ export declare function Titled({ title, children }: {
|
|
|
9
9
|
}): import("react").JSX.Element;
|
|
10
10
|
export declare function formatPercent(p: number): string;
|
|
11
11
|
export declare const funnelDropText: (drop: number) => string;
|
|
12
|
-
export declare function useChartFormat({ locale, format, labels }: ChartFormatProps): {
|
|
12
|
+
export declare function useChartFormat({ locale: localeProp, format, labels }: ChartFormatProps): {
|
|
13
13
|
nf: (n: number) => string;
|
|
14
14
|
L: ChartLabels;
|
|
15
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Collapsible } from './Collapsible';
|
|
2
2
|
export { CollapsibleItem } from './CollapsibleItem';
|
|
3
3
|
export { CollapsibleContext, useCollapsibleContext } from './CollapsibleContext';
|
|
4
|
-
export type { CollapsibleProps, CollapsibleItemProps, CollapsibleContextValue, CollapsibleVariant, CollapsibleSize, CollapsibleColor, CollapsibleIconPosition, CollapsibleExpansionMode, CollapsibleAuthorize, } from '../../core/types';
|
|
4
|
+
export type { CollapsibleProps, CollapsibleItemProps, CollapsibleContextValue, CollapsibleVariant, CollapsibleSize, CollapsibleColor, CollapsibleIconPosition, CollapsibleExpansionMode, CollapsibleAuthorize, CollapsibleDisclosure, CollapsibleTone, CollapsibleHeadingLevel, } from '../../core/types';
|
|
@@ -12,5 +12,5 @@ export declare function sameSorting(a: Array<{
|
|
|
12
12
|
id: string;
|
|
13
13
|
desc: boolean;
|
|
14
14
|
}>): 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, renderDetail: tableRenderDetail, detailBar, openRowId: openRowIdProp, onOpenRowChange, shortcuts: tableShortcutsProp, sharing, renamedViews, prefsVersion, migratePrefs, title, }: DataTableProps<TData>): React.JSX.Element;
|
|
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;
|
|
16
16
|
export default DataTable;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ColumnTextContext } from '../columnValue';
|
|
1
2
|
import { type DataTableCardField, type DataTableCardFields, type DataTableColumn, type DataTableListField, type DataTableListFields } from '../types';
|
|
2
3
|
export interface FieldSet<K extends string> {
|
|
3
4
|
kind: 'card' | 'list';
|
|
@@ -22,10 +23,7 @@ export declare function defaultCardFields(columns: DataTableColumn[], configured
|
|
|
22
23
|
export declare const isListFields: (value: unknown) => value is Partial<DataTableListFields>;
|
|
23
24
|
export declare const normalizeListFields: (raw: Partial<DataTableListFields> | undefined, columns: DataTableColumn[]) => DataTableListFields;
|
|
24
25
|
export declare function defaultListFields(columns: DataTableColumn[], configured: Partial<DataTableListFields> | undefined, card: DataTableCardFields): DataTableListFields;
|
|
25
|
-
export
|
|
26
|
-
yes: string;
|
|
27
|
-
no: string;
|
|
28
|
-
}
|
|
26
|
+
export type CellTextLabels = ColumnTextContext;
|
|
29
27
|
export declare function cellText(column: DataTableColumn, row: unknown, labels: CellTextLabels): string;
|
|
30
28
|
export declare function valueText(column: DataTableColumn, value: unknown, labels: CellTextLabels): string;
|
|
31
29
|
export declare function initialsOf(text: string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DateDisplayFormat, UIFormat } from '../../core/types';
|
|
2
|
+
import { type TableDate } from '../../core/logic';
|
|
3
|
+
import type { DataTableColumn } from './types';
|
|
4
|
+
export declare const DEFAULT_TABLE_DATE_FORMAT: DateDisplayFormat;
|
|
5
|
+
export declare function columnValueOf<T>(col: DataTableColumn<T>, row: T): unknown;
|
|
6
|
+
export declare function columnDateOf<T>(col: DataTableColumn<T>, value: unknown, row?: T): TableDate | null;
|
|
7
|
+
export declare const columnDate: <T>(col: DataTableColumn<T>, row: T) => TableDate | null;
|
|
8
|
+
export declare function filterDateOf<T>(col: DataTableColumn<T>, value: unknown, row?: T): TableDate | null;
|
|
9
|
+
export declare function dateCellText<T>(col: DataTableColumn<T>, value: unknown, row?: T): string;
|
|
10
|
+
export interface ColumnTextContext {
|
|
11
|
+
yes: string;
|
|
12
|
+
no: string;
|
|
13
|
+
fmt?: UIFormat;
|
|
14
|
+
}
|
|
15
|
+
export declare function valueText<T>(col: DataTableColumn<T>, value: unknown, ctx: ColumnTextContext, row?: T): string;
|
|
16
|
+
export declare const columnText: <T>(col: DataTableColumn<T>, row: T, ctx: ColumnTextContext) => string;
|
|
17
|
+
export declare function searchTextOf<T>(col: DataTableColumn<T>, row: T, ctx: ColumnTextContext): string;
|
|
18
|
+
export declare function sortKeyOf<T>(col: DataTableColumn<T>, value: unknown, row: T, ctx: ColumnTextContext): unknown;
|
|
19
|
+
export declare function compareSortKeys(a: unknown, b: unknown): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DataTableCellStyle, DataTableColumn, DataTableExportFormat } from '../types';
|
|
2
|
+
import { type ColumnTextContext } from '../columnValue';
|
|
3
|
+
import type { ColumnMeta } from './exportEngine';
|
|
4
|
+
export interface ExportRowsForFormat {
|
|
5
|
+
headers: string[];
|
|
6
|
+
rows: Record<string, any>[];
|
|
7
|
+
exportColumns: DataTableColumn[];
|
|
8
|
+
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
9
|
+
columnMeta: ColumnMeta[];
|
|
10
|
+
totals: Record<string, any> | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function uniqueHeaders(names: string[]): string[];
|
|
13
|
+
export declare function exportRowsFor<TData>(format: DataTableExportFormat, data: TData[], columns: DataTableColumn<TData>[], visibleKeys: string[], ctx: ColumnTextContext, totalKeys?: string[], totalLabel?: string): ExportRowsForFormat;
|
|
@@ -8,6 +8,7 @@ export interface ColumnMeta {
|
|
|
8
8
|
type?: 'string' | 'number' | 'date' | 'boolean' | 'select' | 'array';
|
|
9
9
|
width?: number;
|
|
10
10
|
format?: 'text' | 'number' | 'currency' | 'date' | 'percentage';
|
|
11
|
+
numFmt?: string;
|
|
11
12
|
cellStyle?: (value: any, row: any) => DataTableCellStyle | undefined;
|
|
12
13
|
}
|
|
13
14
|
export declare function buildColumnMeta(columns: DataTableColumn[], headers: string[]): ColumnMeta[];
|
|
@@ -68,6 +69,7 @@ export declare function buildExportBlob(format: DataTableExportFormat, headers:
|
|
|
68
69
|
};
|
|
69
70
|
totalKeys?: string[];
|
|
70
71
|
columns?: DataTableColumn[];
|
|
72
|
+
columnMeta?: ColumnMeta[];
|
|
71
73
|
cellStyles?: Record<string, DataTableCellStyle>[];
|
|
72
74
|
metadata?: DataTableExportMetadata;
|
|
73
75
|
branding?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type DataTableColumn, type DataTableExportTemplate, type DataTableExportFormat, type DataTableExportAction, type DataTableExportSettings, type DataTableActiveFilter, type DataTableExportResult, type DataTableExportConfig, type DataTablePdfConfig, type DataTableExportSummary, type DataTableExportTemplatePrefs, type DataTableExportOptions, type DataTableAllRowsResult, type DataTableAuthorize, type DataTableSelection } from '../types';
|
|
2
2
|
import type { DataTableExportOptionValues } from '../types';
|
|
3
|
+
import type { ColumnTextContext } from '../columnValue';
|
|
3
4
|
import { type DataTableLabels } from '../labels';
|
|
4
5
|
interface UseTableExportOptions<TData> {
|
|
5
6
|
columns: DataTableColumn<TData>[];
|
|
@@ -25,6 +26,7 @@ interface UseTableExportOptions<TData> {
|
|
|
25
26
|
loadAllRows?: (format: DataTableExportFormat, action: DataTableExportAction, params?: Record<string, unknown>) => Promise<DataTableAllRowsResult<TData>>;
|
|
26
27
|
labels?: DataTableLabels;
|
|
27
28
|
locale?: string;
|
|
29
|
+
text?: ColumnTextContext;
|
|
28
30
|
}
|
|
29
31
|
interface UseTableExportReturn {
|
|
30
32
|
hasExport: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ColumnTextContext } from './columnValue';
|
|
1
2
|
import type { DataTableAuthorize, DataTableExportOptions, DataTableGate } from './types';
|
|
2
3
|
import { type TableFormat, type DataTableLabels } from './labels';
|
|
3
4
|
export interface TableHost {
|
|
@@ -7,6 +8,7 @@ export interface TableHost {
|
|
|
7
8
|
operators?: readonly string[];
|
|
8
9
|
labels: DataTableLabels;
|
|
9
10
|
format: TableFormat;
|
|
11
|
+
text: ColumnTextContext;
|
|
10
12
|
}
|
|
11
13
|
export declare const TableHostContext: import("react").Context<TableHost>;
|
|
12
14
|
export declare function useTableHost(): TableHost;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as DataTable } from './DataTable';
|
|
2
|
-
export type { DataTableProps, DataTableView, DataTableColumn, DataTableColumnType, DataTableComponentProps, DataTableRowAction, DataTableFilterGroup, DataTableFilterCondition, DataTableActiveFilter, DataTableSingleRowView, DataTableSingleRowField, DataTableSingleRowAction, DataTableSelectionConfig, DataTableSelectionShow, DataTablePaginationConfig, DataTableSortingConfig, DataTableFilteringConfig, DataTableQuickFilter, DataTableQuickFilterMode, DataTableSavedFilter, DataTableSavedFilterIssue, DataTableViewPrefs, DataTableExportFormat, DataTableExportAction, DataTableExportTemplate, DataTableQuickExport, DataTableExportConfig, DataTableXlsxStyle, DataTablePdfConfig, DataTableExportGenerator, DataTableExportResult, DataTableExportResultStatus, DataTableExportGeneratorResult, DataTableFilenameContext, DataTableExportMeta, DataTableExportContext, DataTableExportSettings, DataTableExportPrefs, DataTableExportMetadata, DataTableExportSummary, DataTableExportSummaryTable, DataTableExportOptions, DataTableFileNameAs, DataTablePdfFonts, DataTablePdfPageSize, DataTablePdfOrientation, DataTablePdfFontSize, DataTablePdfMargins, DataTableSummaryConfig, DataTableSummaryCard, DataTableSummaryValueCard, DataTableSummaryRatioCard, DataTableSummaryBreakdownCard, DataTableSummaryTrendCard, DataTableSummaryFunnelCard, DataTableSummaryFunnelStep, DataTableSummaryValueTrend, DataTableSummaryPeriod, DataTableSummaryTrendChart, DataTableSummaryValueChart, DataTableSummaryRatioChart, DataTableSummaryAnyChart, DataTableSummaryCardRequest, DataTableSummaryPeriodCount, DataTableSummaryFigure, DataTableSummarySubline, DataTableSummaryStrip, DataTableSummaryChart, DataTableSummaryWidth, DataTableSummaryShow, DataTableSummaryPart, DataTableSummaryUserCard, DataTableSummaryPrefs, DataTableExportSummaryMode, DataTableSummaryPlacement, DataTableSummaryRequest, DataTableSummaryBucket, DataTableSummaryBreakdown, DataTableSummaryFigures, DataTableLicense, DataTableFlashColor, DataTableFlashColors, DataTableCellFlashStyle, DataTableCellStyle, DataTableLayout, DataTableCardFields, DataTableCardField, DataTableListFields, DataTableListField, DataTableRowMenuConfig, DataTableRowMenuItem, DataTableRowMenuBuiltIn, DataTableRowMenuIconAction, DataTableDetailMode, DataTableDetailContext, DataTableDetailRenderer, DataTableDisplayPrefs, DataTableDensity, DataTableFontSize, DataTableColumnWidth, DataTableActionDisplay, DataTableQuery, DataTableDataSource, DataTableRowsResult, DataTableAllRowsResult, DataTableCounts, DataTableInitialState, DataTableApi, DataTablePersistence, DataTableGate, DataTableAuthorize, DataTableManagePrefs, DataTableManageList, DataTableViewsPrefs, DataTableExportTemplatePrefs, DataTableBulkAction, DataTableBulkActionContext, DataTableBulkActionResult, DataTableBulkConfirm, DataTableSelection, DataTableColumnPinning, DataTablePinningConfig, DataTableKeyboardConfig, DataTableShortcut, DataTableVirtualizeConfig, DataTableGroupingConfig, DataTableGroupPathItem, DataTableGroupResult, DataTableGroupSummaryContext, DataTableViewState, DataTableSharedView, DataTableShareAudience, DataTableSharing, } from './types';
|
|
2
|
+
export type { DataTableProps, DataTableView, DataTableColumn, DataTableColumnType, DataTableNumberFormat, DataTableComponentProps, DataTableRowAction, DataTableFilterGroup, DataTableFilterCondition, DataTableActiveFilter, DataTableSingleRowView, DataTableSingleRowField, DataTableSingleRowAction, DataTableSelectionConfig, DataTableSelectionShow, DataTablePaginationConfig, DataTableSortingConfig, DataTableFilteringConfig, DataTableQuickFilter, DataTableQuickFilterMode, DataTableSavedFilter, DataTableSavedFilterIssue, DataTableViewPrefs, DataTableExportFormat, DataTableExportAction, DataTableExportTemplate, DataTableQuickExport, DataTableExportConfig, DataTableXlsxStyle, DataTablePdfConfig, DataTableExportGenerator, DataTableExportResult, DataTableExportResultStatus, DataTableExportGeneratorResult, DataTableFilenameContext, DataTableExportMeta, DataTableExportContext, DataTableExportSettings, DataTableExportPrefs, DataTableExportMetadata, DataTableExportSummary, DataTableExportSummaryTable, DataTableExportOptions, DataTableFileNameAs, DataTablePdfFonts, DataTablePdfPageSize, DataTablePdfOrientation, DataTablePdfFontSize, DataTablePdfMargins, DataTableSummaryConfig, DataTableSummaryCard, DataTableSummaryValueCard, DataTableSummaryRatioCard, DataTableSummaryBreakdownCard, DataTableSummaryTrendCard, DataTableSummaryFunnelCard, DataTableSummaryFunnelStep, DataTableSummaryValueTrend, DataTableSummaryPeriod, DataTableSummaryTrendChart, DataTableSummaryValueChart, DataTableSummaryRatioChart, DataTableSummaryAnyChart, DataTableSummaryCardRequest, DataTableSummaryPeriodCount, DataTableSummaryFigure, DataTableSummarySubline, DataTableSummaryStrip, DataTableSummaryChart, DataTableSummaryWidth, DataTableSummaryShow, DataTableSummaryPart, DataTableSummaryUserCard, DataTableSummaryPrefs, DataTableExportSummaryMode, DataTableSummaryPlacement, DataTableSummaryRequest, DataTableSummaryBucket, DataTableSummaryBreakdown, DataTableSummaryFigures, DataTableLicense, DataTableFlashColor, DataTableFlashColors, DataTableCellFlashStyle, DataTableCellStyle, DataTableLayout, DataTableCardFields, DataTableCardField, DataTableListFields, DataTableListField, DataTableRowMenuConfig, DataTableRowMenuItem, DataTableRowMenuBuiltIn, DataTableRowMenuIconAction, DataTableDetailMode, DataTableDetailContext, DataTableDetailRenderer, DataTableDisplayPrefs, DataTableDensity, DataTableFontSize, DataTableColumnWidth, DataTableActionDisplay, DataTableQuery, DataTableDataSource, DataTableRowsResult, DataTableAllRowsResult, DataTableCounts, DataTableInitialState, DataTableApi, DataTablePersistence, DataTableGate, DataTableAuthorize, DataTableManagePrefs, DataTableManageList, DataTableViewsPrefs, DataTableExportTemplatePrefs, DataTableBulkAction, DataTableBulkActionContext, DataTableBulkActionResult, DataTableBulkConfirm, DataTableSelection, DataTableColumnPinning, DataTablePinningConfig, DataTableKeyboardConfig, DataTableShortcut, DataTableVirtualizeConfig, DataTableGroupingConfig, DataTableGroupPathItem, DataTableGroupResult, DataTableGroupSummaryContext, DataTableViewState, DataTableSharedView, DataTableShareAudience, DataTableSharing, } from './types';
|
|
3
3
|
export { isFilterGroup, CARD_FIELD_LIMITS, LIST_FIELD_LIMITS, SUMMARY_PLACEMENTS_MAX, SUMMARY_SHOWS, SUMMARY_STRIPS, SUMMARY_TREND_COUNTS, SUMMARY_TREND_COUNT_BOUNDS, SUMMARY_KIND_CHARTS, SUMMARY_USER_CARDS_MAX, SUMMARY_WIDTHS } from './types';
|
|
4
4
|
export { DEFAULT_DATA_TABLE_LABELS } from './labels';
|
|
5
5
|
export type { DataTableLabels, DataTableLabelKey } from './labels';
|
|
@@ -459,6 +459,8 @@ export declare const DEFAULT_DATA_TABLE_LABELS: {
|
|
|
459
459
|
exportPreviewLoadFailed: string;
|
|
460
460
|
exportLoadFailed: string;
|
|
461
461
|
exportGenerationFailed: string;
|
|
462
|
+
exportCancelled: (title: string) => string;
|
|
463
|
+
exportAwaitingClick: (title: string) => string;
|
|
462
464
|
exportValidationFailed: string;
|
|
463
465
|
exportCapped: (shown: string, total: string) => string;
|
|
464
466
|
exportBusiness: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from 'react';
|
|
2
2
|
import type { ChartProgressColor, ChartSlot, TrendGood } from '../Charts';
|
|
3
3
|
import type { DataTableLabels } from './labels';
|
|
4
|
+
import type { DateDisplayFormat } from '../../core/types';
|
|
4
5
|
export type DataTableFlashColor = 'green' | 'red' | 'amber' | 'blue' | 'purple' | 'teal' | 'orange' | 'pink';
|
|
5
6
|
export interface DataTableFlashColors {
|
|
6
7
|
up?: DataTableFlashColor;
|
|
@@ -33,6 +34,7 @@ export interface DataTableCellStyle {
|
|
|
33
34
|
fontSize?: number;
|
|
34
35
|
align?: 'left' | 'center' | 'right';
|
|
35
36
|
}
|
|
37
|
+
export type DataTableNumberFormat = 'integer' | 'amount' | 'currency' | 'percent';
|
|
36
38
|
export interface DataTableColumn<TData = any> {
|
|
37
39
|
key: string;
|
|
38
40
|
header: string;
|
|
@@ -52,6 +54,15 @@ export interface DataTableColumn<TData = any> {
|
|
|
52
54
|
value: any;
|
|
53
55
|
}>;
|
|
54
56
|
filterAccessor?: (value: any) => any;
|
|
57
|
+
parse?: DateDisplayFormat | ((value: any, row: TData) => unknown);
|
|
58
|
+
dateFormat?: DateDisplayFormat;
|
|
59
|
+
value?: (row: TData) => unknown;
|
|
60
|
+
format?: (value: any, row: TData) => string;
|
|
61
|
+
numberFormat?: DataTableNumberFormat;
|
|
62
|
+
sortValue?: (value: any, row: TData) => unknown;
|
|
63
|
+
compare?: (a: any, b: any) => number;
|
|
64
|
+
searchText?: (value: any, row: TData) => string;
|
|
65
|
+
groupValue?: (value: any, row: TData) => string | number | boolean | null;
|
|
55
66
|
field?: string;
|
|
56
67
|
groupable?: boolean;
|
|
57
68
|
authorized?: boolean;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { UIFormat } from '../../core/types';
|
|
2
|
+
import { type ColumnTextContext } from './columnValue';
|
|
1
3
|
import { type DataTableView, type DataTableColumn, type UseTableReturn, type DataTableInitialState } from './types';
|
|
2
4
|
import { type DataTableLabels } from './labels';
|
|
3
|
-
export declare function rowMatchesSearch<TData>(row: TData, columns: DataTableColumn<TData>[], search: string): boolean;
|
|
5
|
+
export declare function rowMatchesSearch<TData>(row: TData, columns: DataTableColumn<TData>[], search: string, ctx?: ColumnTextContext): boolean;
|
|
4
6
|
export interface UseTableOptions {
|
|
5
7
|
serverMode?: boolean;
|
|
6
8
|
rowCount?: number;
|
|
7
9
|
initialState?: DataTableInitialState;
|
|
8
10
|
defaultPageSize?: number;
|
|
9
11
|
labels?: DataTableLabels;
|
|
12
|
+
format?: UIFormat;
|
|
10
13
|
customPaging?: boolean;
|
|
11
14
|
}
|
|
12
15
|
export declare function useTable<TData = any>(data: TData[], config: DataTableView<TData>, options?: UseTableOptions): UseTableReturn<TData>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { mergeColumnOrder } from './columnOrder';
|
|
2
2
|
export { extractDifferences, applyDifferences, type DeepPartial } from './diff';
|
|
3
|
-
export { createPdfBlob, rawDataToBlob, downloadBlob, shareFile, openPreview, executeFileAction, getExtension, getFormatLabel, safeFileName, safeFileBaseName, EXTENSION_MAP, MIME_MAP, type FileFormat, type FileAction, } from '
|
|
3
|
+
export { createPdfBlob, rawDataToBlob, downloadBlob, shareFile, openPreview, executeFileAction, getExtension, getFormatLabel, safeFileName, safeFileBaseName, EXTENSION_MAP, MIME_MAP, type FileFormat, type FileAction, } from '../../../file/fileActions';
|
|
@@ -7,7 +7,7 @@ export declare function frameProps(layout: ResolvedColumnLayout): {
|
|
|
7
7
|
'data-sticky-edge'?: '';
|
|
8
8
|
style: React.CSSProperties;
|
|
9
9
|
};
|
|
10
|
-
export declare function formatReadOnlyValue(value: unknown): string;
|
|
10
|
+
export declare function formatReadOnlyValue(value: unknown, locale?: string): string;
|
|
11
11
|
export interface EditableTableCellProps<T> {
|
|
12
12
|
rule?: ResolvedRule;
|
|
13
13
|
landed?: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileDeliveryAction, FileJob } from '../../core/types';
|
|
2
|
+
import { type FileEngine, type FileJobRequest } from '../../file/fileEngine';
|
|
3
|
+
export declare const FileEngineContext: import("react").Context<FileEngine | null>;
|
|
4
|
+
export declare function getDefaultFileEngine(): FileEngine;
|
|
5
|
+
export declare function useFileEngineInstance(): FileEngine;
|
|
6
|
+
export interface UseFileEngineResult {
|
|
7
|
+
jobs: readonly FileJob[];
|
|
8
|
+
submit: (request: FileJobRequest) => string;
|
|
9
|
+
cancel: (id: string) => void;
|
|
10
|
+
retry: (id: string) => void;
|
|
11
|
+
deliver: (id: string, action?: FileDeliveryAction) => Promise<void>;
|
|
12
|
+
wait: (id: string) => Promise<FileJob | undefined>;
|
|
13
|
+
clear: (filter?: (job: FileJob) => boolean) => void;
|
|
14
|
+
engine: FileEngine;
|
|
15
|
+
}
|
|
16
|
+
export declare function useFileEngine(): UseFileEngineResult;
|
|
17
|
+
export declare function useFileJob(id: string | null | undefined): FileJob | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CreateFileEngineOptions, type FileEngine } from '../../file/fileEngine';
|
|
3
|
+
import { type FileEngineLabels, type FileEngineLabelsInput } from './labels';
|
|
4
|
+
export interface FileEngineProviderProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
engine?: FileEngine;
|
|
7
|
+
options?: CreateFileEngineOptions;
|
|
8
|
+
notify?: boolean;
|
|
9
|
+
labels?: FileEngineLabelsInput;
|
|
10
|
+
}
|
|
11
|
+
export declare function useFileEngineLabels(labels?: FileEngineLabelsInput): FileEngineLabels;
|
|
12
|
+
export declare const FileEngineProvider: React.FC<FileEngineProviderProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FileJob } from '../../core/types';
|
|
3
|
+
import type { FileEngineLabelsInput } from './labels';
|
|
4
|
+
export interface FileJobsTrayProps {
|
|
5
|
+
filter?: (job: FileJob) => boolean;
|
|
6
|
+
labels?: FileEngineLabelsInput;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const FileJobsTray: React.FC<FileJobsTrayProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { FileEngineProvider, useFileEngineLabels } from './FileEngineProvider';
|
|
2
|
+
export type { FileEngineProviderProps } from './FileEngineProvider';
|
|
3
|
+
export { FileJobsTray } from './FileJobsTray';
|
|
4
|
+
export type { FileJobsTrayProps } from './FileJobsTray';
|
|
5
|
+
export { FileEngineContext, useFileEngine, useFileJob, getDefaultFileEngine } from './FileEngineContext';
|
|
6
|
+
export type { UseFileEngineResult } from './FileEngineContext';
|
|
7
|
+
export { DEFAULT_FILE_ENGINE_LABELS } from './labels';
|
|
8
|
+
export type { FileEngineLabels, FileEngineLabelsInput } from './labels';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const DEFAULT_FILE_ENGINE_LABELS: {
|
|
2
|
+
tray: string;
|
|
3
|
+
status: {
|
|
4
|
+
queued: string;
|
|
5
|
+
running: string;
|
|
6
|
+
ready: string;
|
|
7
|
+
delivered: string;
|
|
8
|
+
failed: string;
|
|
9
|
+
cancelled: string;
|
|
10
|
+
};
|
|
11
|
+
actions: {
|
|
12
|
+
download: string;
|
|
13
|
+
share: string;
|
|
14
|
+
preview: string;
|
|
15
|
+
print: string;
|
|
16
|
+
open: string;
|
|
17
|
+
};
|
|
18
|
+
cancel: string;
|
|
19
|
+
retry: string;
|
|
20
|
+
dismiss: string;
|
|
21
|
+
readyToast: (filename: string) => string;
|
|
22
|
+
failedToast: (filename: string) => string;
|
|
23
|
+
};
|
|
24
|
+
export type FileEngineLabels = typeof DEFAULT_FILE_ENGINE_LABELS;
|
|
25
|
+
export type FileEngineLabelsInput = Partial<Omit<FileEngineLabels, 'status' | 'actions'>> & {
|
|
26
|
+
status?: Partial<FileEngineLabels['status']>;
|
|
27
|
+
actions?: Partial<FileEngineLabels['actions']>;
|
|
28
|
+
};
|
|
29
|
+
export declare function resolveFileEngineLabels(labels?: FileEngineLabelsInput): FileEngineLabels;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToastApi, ToastDefaults } from './toast.types';
|
|
3
3
|
export declare const useToast: () => ToastApi;
|
|
4
|
+
export declare const useOptionalToast: () => ToastApi | null;
|
|
4
5
|
export interface ToastHostProps {
|
|
5
6
|
defaults?: ToastDefaults;
|
|
6
7
|
children?: React.ReactNode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UIFormat, UIFormatSettings } from '../../core/types';
|
|
3
|
+
export interface FormatProviderProps extends UIFormatSettings {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const FormatProvider: React.FC<FormatProviderProps>;
|
|
7
|
+
export declare function useFormat(): UIFormat;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { DataTableLabels } from '../DataTable/labels';
|
|
2
|
+
import type { ChartLabels } from '../Charts/labels';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const DEFAULT_UI_LABELS: {
|
|
5
|
+
common: {
|
|
6
|
+
loading: string;
|
|
7
|
+
};
|
|
8
|
+
dialog: {
|
|
9
|
+
ok: string;
|
|
10
|
+
cancel: string;
|
|
11
|
+
confirm: string;
|
|
12
|
+
close: string;
|
|
13
|
+
};
|
|
14
|
+
toast: {
|
|
15
|
+
dismiss: string;
|
|
16
|
+
};
|
|
17
|
+
input: {
|
|
18
|
+
clear: string;
|
|
19
|
+
showPassword: string;
|
|
20
|
+
hidePassword: string;
|
|
21
|
+
};
|
|
22
|
+
select: {
|
|
23
|
+
clear: string;
|
|
24
|
+
options: string;
|
|
25
|
+
search: string;
|
|
26
|
+
selectAll: string;
|
|
27
|
+
deselectAll: string;
|
|
28
|
+
noResults: string;
|
|
29
|
+
noOptions: string;
|
|
30
|
+
fixed: string;
|
|
31
|
+
alwaysDisabled: string;
|
|
32
|
+
maxReached: string;
|
|
33
|
+
dragToReorder: string;
|
|
34
|
+
fixedPosition: string;
|
|
35
|
+
};
|
|
36
|
+
suggest: {
|
|
37
|
+
placeholder: string;
|
|
38
|
+
loading: string;
|
|
39
|
+
noResults: string;
|
|
40
|
+
suggestions: string;
|
|
41
|
+
otherGroup: string;
|
|
42
|
+
};
|
|
43
|
+
commandPalette: {
|
|
44
|
+
placeholder: string;
|
|
45
|
+
empty: string;
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
datePicker: {
|
|
49
|
+
clear: string;
|
|
50
|
+
apply: string;
|
|
51
|
+
presetRanges: string;
|
|
52
|
+
previousMonth: string;
|
|
53
|
+
nextMonth: string;
|
|
54
|
+
presets: {
|
|
55
|
+
today: string;
|
|
56
|
+
yesterday: string;
|
|
57
|
+
last7: string;
|
|
58
|
+
last30: string;
|
|
59
|
+
thisWeek: string;
|
|
60
|
+
lastWeek: string;
|
|
61
|
+
thisMonth: string;
|
|
62
|
+
lastMonth: string;
|
|
63
|
+
thisQuarter: string;
|
|
64
|
+
lastQuarter: string;
|
|
65
|
+
thisFY: string;
|
|
66
|
+
lastFY: string;
|
|
67
|
+
ytd: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
stepper: {
|
|
71
|
+
completed: string;
|
|
72
|
+
};
|
|
73
|
+
tooltip: {
|
|
74
|
+
moreInformation: string;
|
|
75
|
+
};
|
|
76
|
+
colorScheme: {
|
|
77
|
+
sample: string;
|
|
78
|
+
};
|
|
79
|
+
editableTable: {
|
|
80
|
+
addRow: string;
|
|
81
|
+
copyRow: string;
|
|
82
|
+
deleteRow: string;
|
|
83
|
+
};
|
|
84
|
+
sidebar: {
|
|
85
|
+
name: string;
|
|
86
|
+
closeNavigation: string;
|
|
87
|
+
};
|
|
88
|
+
breadcrumbs: {
|
|
89
|
+
name: string;
|
|
90
|
+
related: string;
|
|
91
|
+
hidden: (count: number) => string;
|
|
92
|
+
};
|
|
93
|
+
image: {
|
|
94
|
+
image: string;
|
|
95
|
+
images: string;
|
|
96
|
+
add: string;
|
|
97
|
+
preparing: string;
|
|
98
|
+
remove: string;
|
|
99
|
+
previous: string;
|
|
100
|
+
next: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export type UILabels = typeof DEFAULT_UI_LABELS & {
|
|
104
|
+
table?: Partial<DataTableLabels>;
|
|
105
|
+
charts?: Partial<ChartLabels>;
|
|
106
|
+
};
|
|
107
|
+
type DeepPartial<T> = {
|
|
108
|
+
[K in keyof T]?: T[K] extends Record<string, unknown> ? DeepPartial<T[K]> : T[K];
|
|
109
|
+
};
|
|
110
|
+
export type UILabelsInput = DeepPartial<UILabels>;
|
|
111
|
+
export declare const LabelsProvider: React.FC<{
|
|
112
|
+
labels?: UILabelsInput;
|
|
113
|
+
children?: React.ReactNode;
|
|
114
|
+
}>;
|
|
115
|
+
export declare const useUILabels: () => UILabels;
|
|
116
|
+
export {};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FieldProviderProps } from '../../core/types';
|
|
3
3
|
import type { ToastDefaults } from '../Toast/toast.types';
|
|
4
|
+
import type { CreateFileEngineOptions, FileEngine } from '../../file/fileEngine';
|
|
5
|
+
import type { UIFormatSettings } from '../../core/types';
|
|
6
|
+
import { type UILabelsInput } from './UILabelsContext';
|
|
4
7
|
import { type ResolvedUITheme, type UITheme } from './UIThemeContext';
|
|
5
|
-
export interface UIProviderProps extends Pick<FieldProviderProps, 'size' | 'variant' | 'layout'
|
|
8
|
+
export interface UIProviderProps extends Pick<FieldProviderProps, 'size' | 'variant' | 'layout'>, UIFormatSettings {
|
|
6
9
|
children?: React.ReactNode;
|
|
7
10
|
theme?: UITheme;
|
|
8
11
|
onThemeChange?: (resolved: ResolvedUITheme, requested: UITheme) => void;
|
|
9
12
|
portalContainer?: HTMLElement | false;
|
|
10
13
|
toast?: ToastDefaults;
|
|
14
|
+
fileEngine?: CreateFileEngineOptions | FileEngine;
|
|
15
|
+
labels?: UILabelsInput;
|
|
11
16
|
}
|
|
12
17
|
declare const UIProvider: React.FC<UIProviderProps>;
|
|
13
18
|
export default UIProvider;
|
|
@@ -3,3 +3,7 @@ export type { UIProviderProps } from './UIProvider';
|
|
|
3
3
|
export { useUIPortalContainer, UIPortalContext } from './UIPortalContext';
|
|
4
4
|
export { useUITheme, UIThemeContext } from './UIThemeContext';
|
|
5
5
|
export type { UITheme, ResolvedUITheme, UIThemeValue } from './UIThemeContext';
|
|
6
|
+
export { FormatProvider, useFormat } from './UIFormatContext';
|
|
7
|
+
export type { FormatProviderProps } from './UIFormatContext';
|
|
8
|
+
export { LabelsProvider, useUILabels, DEFAULT_UI_LABELS } from './UILabelsContext';
|
|
9
|
+
export type { UILabels, UILabelsInput } from './UILabelsContext';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { CollapsibleVariant, CollapsibleSize, CollapsibleColor, CollapsibleIconPosition, CollapsibleDisclosure, CollapsibleTone } from '../types';
|
|
1
|
+
import { CollapsibleVariant, CollapsibleSize, CollapsibleColor, CollapsibleIconPosition, CollapsibleDisclosure, CollapsibleTone, CollapsibleExpansionMode } from '../types';
|
|
2
|
+
export declare function toExpandedSet(value: string | readonly string[] | undefined): Set<string>;
|
|
3
|
+
export declare function initialExpandedSet(containerDefault: string | readonly string[] | undefined, itemDefaults: readonly string[], mode: CollapsibleExpansionMode): Set<string>;
|
|
4
|
+
export declare function toggleExpanded(current: ReadonlySet<string>, id: string, mode: CollapsibleExpansionMode): Set<string>;
|
|
5
|
+
export declare function expandedValue(expanded: ReadonlySet<string>, mode: CollapsibleExpansionMode): string | string[];
|
|
2
6
|
interface CollapsibleContainerOpts {
|
|
3
7
|
variant: CollapsibleVariant;
|
|
4
8
|
size: CollapsibleSize;
|
|
@@ -17,6 +21,7 @@ export declare function buildCollapsibleIconClassKeys(opts: CollapsibleIconOpts)
|
|
|
17
21
|
interface CollapsibleItemOpts {
|
|
18
22
|
isExpanded: boolean;
|
|
19
23
|
isDisabled: boolean;
|
|
24
|
+
standaloneSize?: CollapsibleSize;
|
|
20
25
|
}
|
|
21
26
|
export declare function buildCollapsibleItemClassKeys(opts: CollapsibleItemOpts): string[];
|
|
22
27
|
interface CollapsibleHeaderOpts {
|
|
@@ -113,6 +113,7 @@ export interface DatePresetOptions {
|
|
|
113
113
|
fyStartMonth?: number;
|
|
114
114
|
weekStart?: number;
|
|
115
115
|
only?: string[];
|
|
116
|
+
labels?: Partial<Record<string, string>>;
|
|
116
117
|
}
|
|
117
118
|
export declare function financialYearOf(day: IsoDay, fyStartMonth?: number): {
|
|
118
119
|
from: IsoDay;
|
|
@@ -134,3 +135,7 @@ export declare function viewForRange(from: IsoDay, to: IsoDay, opts?: {
|
|
|
134
135
|
currentMonthSide?: 'left' | 'right';
|
|
135
136
|
}): IsoDay;
|
|
136
137
|
export declare function extendDateRange(range: Partial<DayRange> | null | undefined, day: IsoDay): DayRange;
|
|
138
|
+
export declare function calendarNames(locale?: string): {
|
|
139
|
+
months: string[];
|
|
140
|
+
weekdays: string[];
|
|
141
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const guardSpreadsheetText: (text: string) => string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FileEngineOptions, FileJob, FileJobAction } from '../types';
|
|
2
|
+
export declare const FILE_ENGINE_DEFAULTS: Required<FileEngineOptions>;
|
|
3
|
+
export declare function resolveFileEngineOptions(options?: FileEngineOptions): Required<FileEngineOptions>;
|
|
4
|
+
export declare const isFinishedJob: (job: Pick<FileJob, "status">) => boolean;
|
|
5
|
+
export declare const isActiveJob: (job: Pick<FileJob, "status">) => boolean;
|
|
6
|
+
export declare function pickJobsToStart(jobs: readonly FileJob[], concurrency: number): string[];
|
|
7
|
+
export type SubmitDecision = {
|
|
8
|
+
kind: 'reuse';
|
|
9
|
+
id: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'add';
|
|
12
|
+
cancel: string[];
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'reject';
|
|
15
|
+
reason: 'queue-full';
|
|
16
|
+
};
|
|
17
|
+
export declare function decideSubmit(jobs: readonly FileJob[], request: {
|
|
18
|
+
dedupeKey?: string;
|
|
19
|
+
replace?: boolean;
|
|
20
|
+
}, maxQueued: number): SubmitDecision;
|
|
21
|
+
export declare const shouldRetryJob: (job: Pick<FileJob, "attempts" | "retry">) => boolean;
|
|
22
|
+
export declare function nextJobProgress(current: number, reported: number): number | null;
|
|
23
|
+
export declare const USER_ACTIVATION_WINDOW_MS = 4000;
|
|
24
|
+
export declare function deliveryTiming(action: FileJobAction, context: {
|
|
25
|
+
activationActive?: boolean;
|
|
26
|
+
sinceSubmitMs: number;
|
|
27
|
+
}): 'now' | 'wait';
|
|
28
|
+
export declare function jobsToPrune(jobs: readonly FileJob[], keepFinished: number): string[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UIFormat, UIFormatSettings } from '../types';
|
|
2
|
+
export declare const DEFAULT_DATE_FORMAT: "dd-mm-yyyy";
|
|
3
|
+
export declare function createUIFormat(settings?: UIFormatSettings): UIFormat;
|
|
4
|
+
export declare function mergeFormatSettings(parent: UIFormatSettings, own: UIFormatSettings): UIFormatSettings;
|
|
@@ -26,6 +26,10 @@ export * from './select.logic';
|
|
|
26
26
|
export * from './suggest.logic';
|
|
27
27
|
export * from './switch.logic';
|
|
28
28
|
export * from './tableLayout.logic';
|
|
29
|
+
export * from './fileQueue.logic';
|
|
30
|
+
export * from './exportSafety.logic';
|
|
31
|
+
export * from './format.logic';
|
|
32
|
+
export * from './tableDate.logic';
|
|
29
33
|
export * from './tableSummary.logic';
|
|
30
34
|
export * from './tooltip.logic';
|
|
31
35
|
export * from './typography.logic';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DateDisplayFormat } from '../types';
|
|
2
|
+
export type TableDate = string;
|
|
3
|
+
export declare function toTableDate(raw: unknown, parse?: DateDisplayFormat): TableDate | null;
|
|
4
|
+
export declare const tableDay: (value: TableDate | null) => string | null;
|
|
5
|
+
export declare const compareTableDates: (a: TableDate, b: TableDate) => number;
|
|
6
|
+
export declare function formatTableDate(value: TableDate | null, format?: DateDisplayFormat): string;
|
|
7
|
+
export declare function compareBlanksLast<T>(a: T | null | undefined, b: T | null | undefined, desc: boolean, compare: (a: T, b: T) => number): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ColumnSummaryConfig, EditableTableColumnDefinition, ResolvedColumnTotal, ResolvedSummaryEntry, ResolvedSummaryGroup, SummaryAggregation, SummaryContext, SummaryFormat, TableSummaryConfig } from '../types';
|
|
2
|
-
export declare function formatSummaryValue(value: number, format?: SummaryFormat, decimals?: number, prefix?: string, suffix?: string, formatter?: (value: any) => string): string;
|
|
2
|
+
export declare function formatSummaryValue(value: number, format?: SummaryFormat, decimals?: number, prefix?: string, suffix?: string, formatter?: (value: any) => string, locale?: string): string;
|
|
3
3
|
export declare function aggregateValues(values: number[], type: SummaryAggregation): number;
|
|
4
4
|
export declare function columnSummaryConfig(column: EditableTableColumnDefinition<any>): ColumnSummaryConfig | undefined;
|
|
5
|
-
export declare function computeColumnTotals<T>(columns: EditableTableColumnDefinition<T>[], rows: T[]): ResolvedColumnTotal[];
|
|
5
|
+
export declare function computeColumnTotals<T>(columns: EditableTableColumnDefinition<T>[], rows: T[], locale?: string): ResolvedColumnTotal[];
|
|
6
6
|
export interface ResolvedTableSummary {
|
|
7
7
|
columnTotals: ResolvedColumnTotal[];
|
|
8
8
|
totalsByColumn: Record<string, number>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { TooltipProp } from './tooltip.types';
|
|
3
3
|
import type { ControlSize, SemanticColor } from './control.types';
|
|
4
4
|
export type CollapsibleVariant = 'default' | 'bordered' | 'separated' | 'filled' | 'minimal';
|
|
@@ -9,16 +9,7 @@ export type CollapsibleExpansionMode = 'single' | 'multiple';
|
|
|
9
9
|
export type CollapsibleDisclosure = 'chevron' | 'plusminus';
|
|
10
10
|
export type CollapsibleTone = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
11
11
|
export type CollapsibleHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
12
|
-
export
|
|
13
|
-
type: 'r' | 's' | 'b';
|
|
14
|
-
tab: string;
|
|
15
|
-
subtab?: string;
|
|
16
|
-
featurename?: string;
|
|
17
|
-
featurevalue?: string;
|
|
18
|
-
report?: string;
|
|
19
|
-
rightsname?: string;
|
|
20
|
-
reportname?: string;
|
|
21
|
-
}
|
|
12
|
+
export type CollapsibleAuthorize = unknown;
|
|
22
13
|
export interface CollapsibleItemProps {
|
|
23
14
|
id?: string;
|
|
24
15
|
title: string | ReactNode;
|
|
@@ -27,9 +18,6 @@ export interface CollapsibleItemProps {
|
|
|
27
18
|
meta?: string | ReactNode;
|
|
28
19
|
tooltip?: TooltipProp;
|
|
29
20
|
children?: ReactNode;
|
|
30
|
-
Component?: ComponentType<any>;
|
|
31
|
-
JSX?: ReactNode;
|
|
32
|
-
props?: Record<string, any>;
|
|
33
21
|
expanded?: boolean;
|
|
34
22
|
defaultExpanded?: boolean;
|
|
35
23
|
disabled?: boolean;
|
|
@@ -72,7 +60,7 @@ export interface CollapsibleProps {
|
|
|
72
60
|
keyboardNavigation?: boolean;
|
|
73
61
|
'aria-label'?: string;
|
|
74
62
|
'aria-labelledby'?: string;
|
|
75
|
-
renderAuthorize?: (authorize:
|
|
63
|
+
renderAuthorize?: (authorize: any, children: ReactNode) => ReactNode;
|
|
76
64
|
}
|
|
77
65
|
export interface CollapsibleContextValue {
|
|
78
66
|
expandedItems: Set<string>;
|
|
@@ -91,5 +79,5 @@ export interface CollapsibleContextValue {
|
|
|
91
79
|
animationDuration: number;
|
|
92
80
|
collapsedIcon?: ReactNode;
|
|
93
81
|
expandedIcon?: ReactNode;
|
|
94
|
-
renderAuthorize?: (authorize:
|
|
82
|
+
renderAuthorize?: (authorize: any, children: ReactNode) => ReactNode;
|
|
95
83
|
}
|