@dcs-tech/ui 0.4.0 → 0.7.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.
Files changed (70) hide show
  1. package/README.md +27 -0
  2. package/dist/ChartImageMenu-C6MwKKjc.js +1494 -0
  3. package/dist/{ChartView-Cehrcr05.js → ChartView-nS4f4EU_.js} +514 -514
  4. package/dist/{SummaryChart-y27q_BBN.js → SummaryChart-CVg6i2mx.js} +2 -2
  5. package/dist/{SummaryImage-DDNEEu_K.js → SummaryImage-OHJHjCqe.js} +2 -2
  6. package/dist/{SummarySeeAll-0dX-_LFe.js → SummarySeeAll-BYrvXSJ6.js} +5 -5
  7. package/dist/assets/fileTask.worker-BHT1olUk.js +1 -0
  8. package/dist/columnValue-K98ElfJc.js +610 -0
  9. package/dist/exportContext-CJaIv8R-.js +166 -0
  10. package/dist/{exportEngine-DL-jEXFU.js → exportEngine-S8JHzYbS.js} +355 -356
  11. package/dist/file-worker.js +1 -0
  12. package/dist/fileActions-COf5Q4Eg.js +144 -0
  13. package/dist/{geometry-CG2nOEnw.js → geometry-ChwYB45B.js} +433 -497
  14. package/dist/index.js +8817 -8596
  15. package/dist/{defaults-DL745PK1.js → labels-CnqqTrne.js} +3 -79
  16. package/dist/runFileTask--4YjQH7Y.js +210 -0
  17. package/dist/scrollArea-DAlVT5U7.js +214 -0
  18. package/dist/style.css +1 -1
  19. package/dist/{summaryChartData-Djo73zb8.js → summaryChartData-pNvzaEHp.js} +1 -1
  20. package/dist/types/components/Charts/parts.d.ts +1 -1
  21. package/dist/types/components/Collapsible/index.d.ts +1 -1
  22. package/dist/types/components/DataTable/DataTable.d.ts +1 -1
  23. package/dist/types/components/DataTable/cards/cardFields.d.ts +2 -4
  24. package/dist/types/components/DataTable/columnValue.d.ts +19 -0
  25. package/dist/types/components/DataTable/export/exportCells.d.ts +13 -0
  26. package/dist/types/components/DataTable/export/exportEngine.d.ts +13 -4
  27. package/dist/types/components/DataTable/export/useTableExport.d.ts +2 -0
  28. package/dist/types/components/DataTable/host.d.ts +2 -0
  29. package/dist/types/components/DataTable/index.d.ts +1 -1
  30. package/dist/types/components/DataTable/labels.d.ts +2 -0
  31. package/dist/types/components/DataTable/types.d.ts +11 -0
  32. package/dist/types/components/DataTable/useTable.d.ts +4 -1
  33. package/dist/types/components/DataTable/vendor/index.d.ts +1 -1
  34. package/dist/types/components/Dialog/DialogHost.d.ts +1 -0
  35. package/dist/types/components/EditableTable/EditableTableCell.d.ts +1 -1
  36. package/dist/types/components/FileEngine/FileEngineContext.d.ts +17 -0
  37. package/dist/types/components/FileEngine/FileEngineProvider.d.ts +31 -0
  38. package/dist/types/components/FileEngine/FileJobsTray.d.ts +10 -0
  39. package/dist/types/components/FileEngine/index.d.ts +8 -0
  40. package/dist/types/components/FileEngine/labels.d.ts +29 -0
  41. package/dist/types/components/Toast/ToastHost.d.ts +1 -0
  42. package/dist/types/components/UIProvider/UIFormatContext.d.ts +7 -0
  43. package/dist/types/components/UIProvider/UIHostContext.d.ts +20 -0
  44. package/dist/types/components/UIProvider/UILabelsContext.d.ts +116 -0
  45. package/dist/types/components/UIProvider/UIProvider.d.ts +8 -1
  46. package/dist/types/components/UIProvider/index.d.ts +6 -0
  47. package/dist/types/core/logic/collapsible.logic.d.ts +6 -1
  48. package/dist/types/core/logic/datePicker.logic.d.ts +5 -0
  49. package/dist/types/core/logic/exportSafety.logic.d.ts +1 -0
  50. package/dist/types/core/logic/fileQueue.logic.d.ts +28 -0
  51. package/dist/types/core/logic/format.logic.d.ts +4 -0
  52. package/dist/types/core/logic/index.d.ts +4 -0
  53. package/dist/types/core/logic/tableDate.logic.d.ts +7 -0
  54. package/dist/types/core/logic/tableSummary.logic.d.ts +2 -2
  55. package/dist/types/core/types/collapsible.types.d.ts +4 -16
  56. package/dist/types/core/types/fileEngine.types.d.ts +116 -0
  57. package/dist/types/core/types/form.types.d.ts +4 -0
  58. package/dist/types/core/types/format.types.d.ts +15 -0
  59. package/dist/types/core/types/index.d.ts +2 -0
  60. package/dist/types/core/types/table.types.d.ts +1 -0
  61. package/dist/types/{components/DataTable/vendor → file}/fileActions.d.ts +17 -7
  62. package/dist/types/file/fileEngine.d.ts +49 -0
  63. package/dist/types/file/tasks/fileTask.worker.d.ts +1 -0
  64. package/dist/types/file/tasks/runFileTask.d.ts +9 -0
  65. package/dist/types/file/workerPool.d.ts +18 -0
  66. package/dist/types/index.d.ts +11 -2
  67. package/package.json +3 -2
  68. package/dist/ChartImageMenu-HILSfn5A.js +0 -1115
  69. package/dist/exportContext-CdpsOzE8.js +0 -235
  70. package/dist/scrollArea-CkPGDYH2.js +0 -210
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Tt as e, U as t } from "./geometry-CG2nOEnw.js";
2
+ import { Tt as e, U as t } from "./geometry-ChwYB45B.js";
3
3
  // src/components/DataTable/summary/summaryChartData.ts
4
4
  function n(e, t) {
5
5
  return {
@@ -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 interface CellTextLabels {
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;
@@ -1,3 +1,4 @@
1
+ import type { FileTask, PdfTaskFonts, XlsxWorkbookSpec } from '../../../core/types';
1
2
  import { type DataTableExportFormat, type DataTableExportMetadata, type DataTableXlsxStyle, type DataTablePdfConfig, type DataTableColumn, type DataTableCellStyle, type DataTableExportSummary } from '../types';
2
3
  export { autoFormatValue, prepareExportRows, buildBusinessMeta } from './exportRows';
3
4
  export { formatContextLine, formatMetadataLines } from './exportContext';
@@ -8,11 +9,12 @@ export interface ColumnMeta {
8
9
  type?: 'string' | 'number' | 'date' | 'boolean' | 'select' | 'array';
9
10
  width?: number;
10
11
  format?: 'text' | 'number' | 'currency' | 'date' | 'percentage';
12
+ numFmt?: string;
11
13
  cellStyle?: (value: any, row: any) => DataTableCellStyle | undefined;
12
14
  }
13
15
  export declare function buildColumnMeta(columns: DataTableColumn[], headers: string[]): ColumnMeta[];
14
16
  export declare function generateCSV(headers: string[], rows: Record<string, any>[], totals?: Record<string, any> | null, summary?: DataTableExportSummary | null, metadata?: DataTableExportMetadata, subtitle?: string): Blob;
15
- export declare function generateXLSX(headers: string[], rows: Record<string, any>[], config?: {
17
+ type XlsxConfig = {
16
18
  totals?: Record<string, any> | null;
17
19
  summary?: DataTableExportSummary | null;
18
20
  style?: DataTableXlsxStyle;
@@ -21,7 +23,9 @@ export declare function generateXLSX(headers: string[], rows: Record<string, any
21
23
  cellStyles?: Record<string, DataTableCellStyle>[];
22
24
  metadata?: DataTableExportMetadata;
23
25
  subtitle?: string;
24
- }): Promise<Blob>;
26
+ };
27
+ export declare function buildTableXlsxSpec(headers: string[], rows: Record<string, any>[], config?: XlsxConfig): XlsxWorkbookSpec;
28
+ export declare function generateXLSX(headers: string[], rows: Record<string, any>[], config?: XlsxConfig): Promise<Blob>;
25
29
  export declare function generateJSON(rows: Record<string, any>[], summary?: DataTableExportSummary | null, metadata?: DataTableExportMetadata, subtitle?: string): Blob;
26
30
  export declare function generateHTML(headers: string[], rows: Record<string, any>[], config?: {
27
31
  title?: string;
@@ -37,7 +41,10 @@ export declare function generateHTML(headers: string[], rows: Record<string, any
37
41
  url?: string;
38
42
  };
39
43
  }): Blob;
40
- export declare function generateTablePDFDocDef(headers: string[], rows: Record<string, any>[], config?: {
44
+ export type TablePdfTask = Extract<FileTask, {
45
+ kind: 'pdf';
46
+ }>;
47
+ export declare function generateTablePDFTask(headers: string[], rows: Record<string, any>[], config?: {
41
48
  pdfConfig?: DataTablePdfConfig;
42
49
  totals?: Record<string, any> | null;
43
50
  summary?: DataTableExportSummary | null;
@@ -46,7 +53,8 @@ export declare function generateTablePDFDocDef(headers: string[], rows: Record<s
46
53
  cellStyles?: Record<string, DataTableCellStyle>[];
47
54
  metadata?: DataTableExportMetadata;
48
55
  fontFor?: PdfFontFor;
49
- }): any;
56
+ fonts?: PdfTaskFonts;
57
+ }): TablePdfTask;
50
58
  export { rawDataToBlob, downloadBlob, shareFile, openPreview, executeFileAction, getExtension, getFormatLabel, } from '../vendor';
51
59
  export declare function generateXML(headers: string[], rows: Record<string, any>[], config?: {
52
60
  title?: string;
@@ -68,6 +76,7 @@ export declare function buildExportBlob(format: DataTableExportFormat, headers:
68
76
  };
69
77
  totalKeys?: string[];
70
78
  columns?: DataTableColumn[];
79
+ columnMeta?: ColumnMeta[];
71
80
  cellStyles?: Record<string, DataTableCellStyle>[];
72
81
  metadata?: DataTableExportMetadata;
73
82
  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 './fileActions';
3
+ export { createPdfBlob, rawDataToBlob, downloadBlob, shareFile, openPreview, executeFileAction, getExtension, getFormatLabel, safeFileName, safeFileBaseName, EXTENSION_MAP, MIME_MAP, type FileFormat, type FileAction, } from '../../../file/fileActions';
@@ -37,6 +37,7 @@ export interface DialogApi {
37
37
  choose: (opts: ChooseOptions) => Promise<string | null>;
38
38
  alert: (opts: AlertOptions) => Promise<void>;
39
39
  }
40
+ export declare const useOptionalDialog: () => DialogApi | null;
40
41
  export declare const useDialog: () => DialogApi;
41
42
  export declare const DialogHost: React.FC<{
42
43
  children?: React.ReactNode;
@@ -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,31 @@
1
+ import React from 'react';
2
+ import type { FileJob } from '../../core/types';
3
+ import { type CreateFileEngineOptions, type FileEngine } from '../../file/fileEngine';
4
+ import { type FileEngineLabels, type FileEngineLabelsInput } from './labels';
5
+ export interface FileEngineProviderProps {
6
+ children?: React.ReactNode;
7
+ engine?: FileEngine;
8
+ options?: CreateFileEngineOptions;
9
+ notify?: boolean | ((notice: FileJobNotice) => void);
10
+ labels?: FileEngineLabelsInput;
11
+ }
12
+ export type FileJobNotice = {
13
+ type: 'awaiting-click';
14
+ job: FileJob;
15
+ message: string;
16
+ actionLabel: string;
17
+ deliver: () => Promise<void>;
18
+ dismiss: () => void;
19
+ } | {
20
+ type: 'failed';
21
+ job: FileJob;
22
+ message: string;
23
+ actionLabel: string;
24
+ retry: () => void;
25
+ dismiss: () => void;
26
+ } | {
27
+ type: 'resolved';
28
+ job: FileJob;
29
+ };
30
+ export declare function useFileEngineLabels(labels?: FileEngineLabelsInput): FileEngineLabels;
31
+ 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, FileJobNotice } 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,20 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import type { FileJobNotice } from '../FileEngine/FileEngineProvider';
4
+ export interface UIConfirmRequest {
5
+ title: string;
6
+ message: string;
7
+ }
8
+ export interface UIHostDefaults {
9
+ renderAuthorize?: (authorize: any, children: ReactNode) => ReactNode;
10
+ onToast?: (type: 'success' | 'error' | 'info' | 'warning', message: string) => void;
11
+ onNavigate?: (path: string) => void;
12
+ renderLoading?: (isOpen: boolean, message?: string) => ReactNode;
13
+ onConfirm?: (request: UIConfirmRequest) => boolean | Promise<boolean>;
14
+ onFileNotice?: (notice: FileJobNotice) => void;
15
+ }
16
+ export declare const HostProvider: React.FC<{
17
+ host?: UIHostDefaults;
18
+ children?: ReactNode;
19
+ }>;
20
+ export declare const useUIHost: () => UIHostDefaults;
@@ -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,20 @@
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';
7
+ import { type UIHostDefaults } from './UIHostContext';
4
8
  import { type ResolvedUITheme, type UITheme } from './UIThemeContext';
5
- export interface UIProviderProps extends Pick<FieldProviderProps, 'size' | 'variant' | 'layout'> {
9
+ export interface UIProviderProps extends Pick<FieldProviderProps, 'size' | 'variant' | 'layout'>, UIFormatSettings {
6
10
  children?: React.ReactNode;
7
11
  theme?: UITheme;
8
12
  onThemeChange?: (resolved: ResolvedUITheme, requested: UITheme) => void;
9
13
  portalContainer?: HTMLElement | false;
10
14
  toast?: ToastDefaults;
15
+ fileEngine?: CreateFileEngineOptions | FileEngine;
16
+ labels?: UILabelsInput;
17
+ host?: UIHostDefaults;
11
18
  }
12
19
  declare const UIProvider: React.FC<UIProviderProps>;
13
20
  export default UIProvider;
@@ -3,3 +3,9 @@ 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';
10
+ export { HostProvider, useUIHost } from './UIHostContext';
11
+ export type { UIHostDefaults, UIConfirmRequest } from './UIHostContext';
@@ -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;