katucharts.js 0.2.1
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/LICENSE +106 -0
- package/README.md +1100 -0
- package/dist/__vite-optional-peer-dep_jspdf_katucharts-BDMct_Gn.js +4 -0
- package/dist/accessibility/A11yModule.d.ts +26 -0
- package/dist/axis/Axis.d.ts +140 -0
- package/dist/axis/AxisCoordinator.d.ts +38 -0
- package/dist/bio.d.ts +22 -0
- package/dist/components/Credits.d.ts +38 -0
- package/dist/components/Crosshair.d.ts +15 -0
- package/dist/components/DataLabels.d.ts +7 -0
- package/dist/components/ExportButton.d.ts +27 -0
- package/dist/components/Legend.d.ts +53 -0
- package/dist/components/TitleRenderer.d.ts +19 -0
- package/dist/components/Tooltip.d.ts +61 -0
- package/dist/core/Chart.d.ts +156 -0
- package/dist/core/EventBus.d.ts +14 -0
- package/dist/core/InteractionController.d.ts +62 -0
- package/dist/core/OptionsParser.d.ts +61 -0
- package/dist/core/Registry.d.ts +27 -0
- package/dist/core/SVGRenderer.d.ts +48 -0
- package/dist/core/ScrollablePlotOverlay.d.ts +31 -0
- package/dist/core/StackComputer.d.ts +25 -0
- package/dist/core/StateManager.d.ts +21 -0
- package/dist/core/UpdateScheduler.d.ts +28 -0
- package/dist/core/animationConstants.d.ts +20 -0
- package/dist/core/chartTypes.d.ts +46 -0
- package/dist/core/registerAll.d.ts +4 -0
- package/dist/core/registerBio.d.ts +4 -0
- package/dist/core/registerCore.d.ts +4 -0
- package/dist/core/registerFinance.d.ts +4 -0
- package/dist/core/registerFinancial.d.ts +4 -0
- package/dist/core/registerFlow.d.ts +4 -0
- package/dist/core/registerGeneral.d.ts +4 -0
- package/dist/datatable/DataTable.d.ts +162 -0
- package/dist/datatable/DataTableDefaults.d.ts +7 -0
- package/dist/datatable/api/TableApi.d.ts +35 -0
- package/dist/datatable/columns/ColumnDef.d.ts +16 -0
- package/dist/datatable/columns/ColumnManager.d.ts +31 -0
- package/dist/datatable/data/DataProcessor.d.ts +46 -0
- package/dist/datatable/data/DataSource.d.ts +26 -0
- package/dist/datatable/editing/CellEditor.d.ts +29 -0
- package/dist/datatable/export/TableExport.d.ts +23 -0
- package/dist/datatable/locales/en.d.ts +9 -0
- package/dist/datatable/locales/es.d.ts +6 -0
- package/dist/datatable/locales/index.d.ts +22 -0
- package/dist/datatable/locales/pt-BR.d.ts +6 -0
- package/dist/datatable/locales/resolveLocale.d.ts +16 -0
- package/dist/datatable/locales/zh.d.ts +6 -0
- package/dist/datatable/render/CellRenderer.d.ts +24 -0
- package/dist/datatable/render/HeaderRenderer.d.ts +51 -0
- package/dist/datatable/render/PaginationRenderer.d.ts +26 -0
- package/dist/datatable/render/SearchRenderer.d.ts +21 -0
- package/dist/datatable/render/TableRenderer.d.ts +81 -0
- package/dist/datatable/render/ToolbarRenderer.d.ts +34 -0
- package/dist/datatable/render/icons.d.ts +24 -0
- package/dist/datatable/render/popover.d.ts +15 -0
- package/dist/datatable/selection/SelectionManager.d.ts +29 -0
- package/dist/datatable/themes/TableTheme.d.ts +36 -0
- package/dist/datatable/themes/styleSheet.d.ts +16 -0
- package/dist/datatable.d.ts +19 -0
- package/dist/export/ChartExporter.d.ts +50 -0
- package/dist/export/Export.d.ts +76 -0
- package/dist/finance.d.ts +49 -0
- package/dist/index.d.ts +67 -0
- package/dist/indicators/Indicator.d.ts +23 -0
- package/dist/indicators/expandIndicators.d.ts +18 -0
- package/dist/indicators/moving-averages/DEMA.d.ts +10 -0
- package/dist/indicators/moving-averages/EMA.d.ts +12 -0
- package/dist/indicators/moving-averages/SMA.d.ts +11 -0
- package/dist/indicators/moving-averages/TEMA.d.ts +10 -0
- package/dist/indicators/moving-averages/WMA.d.ts +12 -0
- package/dist/indicators/oscillators/CCI.d.ts +11 -0
- package/dist/indicators/oscillators/MACD.d.ts +20 -0
- package/dist/indicators/oscillators/Momentum.d.ts +10 -0
- package/dist/indicators/oscillators/ROC.d.ts +10 -0
- package/dist/indicators/oscillators/RSI.d.ts +11 -0
- package/dist/indicators/oscillators/Stochastic.d.ts +20 -0
- package/dist/indicators/registry.d.ts +9 -0
- package/dist/indicators/trend/ADX.d.ts +11 -0
- package/dist/indicators/trend/IchimokuCloud.d.ts +14 -0
- package/dist/indicators/trend/PSAR.d.ts +11 -0
- package/dist/indicators/util.d.ts +8 -0
- package/dist/indicators/volatility/ATR.d.ts +11 -0
- package/dist/indicators/volatility/BollingerBands.d.ts +11 -0
- package/dist/indicators/volume/OBV.d.ts +11 -0
- package/dist/indicators/volume/VBP.d.ts +12 -0
- package/dist/indicators/volume/VWAP.d.ts +12 -0
- package/dist/interaction/Drilldown.d.ts +29 -0
- package/dist/interaction/HoverManager.d.ts +47 -0
- package/dist/interaction/Zoom.d.ts +68 -0
- package/dist/katucharts-bio.es.js +5861 -0
- package/dist/katucharts-bio.umd.js +1 -0
- package/dist/katucharts-datatable.es.js +3363 -0
- package/dist/katucharts-datatable.umd.js +296 -0
- package/dist/katucharts-finance.es.js +4364 -0
- package/dist/katucharts-finance.umd.js +1 -0
- package/dist/katucharts-react.es.js +35 -0
- package/dist/katucharts-react.umd.js +1 -0
- package/dist/katucharts.es.js +20531 -0
- package/dist/katucharts.umd.js +9 -0
- package/dist/layout/LayoutEngine.d.ts +44 -0
- package/dist/license/LicenseManager.d.ts +63 -0
- package/dist/options/defaults.d.ts +5 -0
- package/dist/react/KatuChartsReact.d.ts +16 -0
- package/dist/react.d.ts +2 -0
- package/dist/responsive/ResponsiveEngine.d.ts +15 -0
- package/dist/series/BaseSeries.d.ts +186 -0
- package/dist/series/bioinformatics/CircosChart.d.ts +4 -0
- package/dist/series/bioinformatics/ClusteredHeatmapChart.d.ts +22 -0
- package/dist/series/bioinformatics/ForestPlotChart.d.ts +21 -0
- package/dist/series/bioinformatics/KaplanMeierChart.d.ts +22 -0
- package/dist/series/bioinformatics/ManhattanChart.d.ts +34 -0
- package/dist/series/bioinformatics/PCoAChart.d.ts +22 -0
- package/dist/series/bioinformatics/PhyloTreeChart.d.ts +27 -0
- package/dist/series/bioinformatics/SequenceLogoChart.d.ts +21 -0
- package/dist/series/bioinformatics/ViolinChart.d.ts +23 -0
- package/dist/series/bioinformatics/VolcanoChart.d.ts +28 -0
- package/dist/series/bioinformatics/circos/CircosChart.d.ts +20 -0
- package/dist/series/bioinformatics/circos/CircosColorScales.d.ts +6 -0
- package/dist/series/bioinformatics/circos/CircosComparativeChart.d.ts +41 -0
- package/dist/series/bioinformatics/circos/CircosHeatmapChart.d.ts +31 -0
- package/dist/series/bioinformatics/circos/CircosLayoutEngine.d.ts +37 -0
- package/dist/series/bioinformatics/circos/CircosRules.d.ts +6 -0
- package/dist/series/bioinformatics/circos/CircosSpiralChart.d.ts +39 -0
- package/dist/series/bioinformatics/circos/CircosTypes.d.ts +131 -0
- package/dist/series/bioinformatics/circos/tracks/AreaTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/ConnectorTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/GlyphTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/HeatmapTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/HighlightTrackRenderer.d.ts +6 -0
- package/dist/series/bioinformatics/circos/tracks/HistogramTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/LineTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/LinkTrackRenderer.d.ts +8 -0
- package/dist/series/bioinformatics/circos/tracks/LollipopTrackRenderer.d.ts +9 -0
- package/dist/series/bioinformatics/circos/tracks/RibbonTrackRenderer.d.ts +9 -0
- package/dist/series/bioinformatics/circos/tracks/ScatterTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/StackTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/TextTrackRenderer.d.ts +8 -0
- package/dist/series/bioinformatics/circos/tracks/TileTrackRenderer.d.ts +7 -0
- package/dist/series/bioinformatics/circos/tracks/TrackAxesRenderer.d.ts +6 -0
- package/dist/series/bioinformatics/circos/tracks/TrackBackgroundRenderer.d.ts +5 -0
- package/dist/series/cartesian/AreaChart.d.ts +33 -0
- package/dist/series/cartesian/BoxPlotChart.d.ts +24 -0
- package/dist/series/cartesian/BubbleChart.d.ts +34 -0
- package/dist/series/cartesian/ColumnChart.d.ts +37 -0
- package/dist/series/cartesian/LineChart.d.ts +28 -0
- package/dist/series/cartesian/ScatterChart.d.ts +20 -0
- package/dist/series/cartesian/SplineChart.d.ts +9 -0
- package/dist/series/cartesian/WaterfallChart.d.ts +25 -0
- package/dist/series/financial/AreaRangeChart.d.ts +24 -0
- package/dist/series/financial/BaselineChart.d.ts +20 -0
- package/dist/series/financial/CandlestickChart.d.ts +55 -0
- package/dist/series/financial/ColumnRangeChart.d.ts +16 -0
- package/dist/series/financial/FlagsChart.d.ts +34 -0
- package/dist/series/financial/HeikinAshiChart.d.ts +11 -0
- package/dist/series/financial/HollowCandlestickChart.d.ts +17 -0
- package/dist/series/financial/KagiChart.d.ts +23 -0
- package/dist/series/financial/LineBreakChart.d.ts +23 -0
- package/dist/series/financial/PointAndFigureChart.d.ts +24 -0
- package/dist/series/financial/RenkoChart.d.ts +22 -0
- package/dist/series/financial/VBPChart.d.ts +18 -0
- package/dist/series/financial/VolumeChart.d.ts +15 -0
- package/dist/series/flow/DependencyWheelChart.d.ts +23 -0
- package/dist/series/flow/NetworkGraphChart.d.ts +18 -0
- package/dist/series/flow/SankeyChart.d.ts +24 -0
- package/dist/series/gauge/GaugeChart.d.ts +40 -0
- package/dist/series/heatmap/HeatmapChart.d.ts +18 -0
- package/dist/series/hierarchical/SunburstChart.d.ts +44 -0
- package/dist/series/hierarchical/TreegraphChart.d.ts +19 -0
- package/dist/series/hierarchical/TreemapChart.d.ts +20 -0
- package/dist/series/hierarchical/WordcloudChart.d.ts +19 -0
- package/dist/series/index.d.ts +45 -0
- package/dist/series/map/FlowmapChart.d.ts +33 -0
- package/dist/series/map/MapChart.d.ts +53 -0
- package/dist/series/map/MapPointChart.d.ts +26 -0
- package/dist/series/map/mapProjection.d.ts +46 -0
- package/dist/series/pie/PieChart.d.ts +53 -0
- package/dist/series/polar/PolarChart.d.ts +18 -0
- package/dist/series/race/BarRaceChart.d.ts +44 -0
- package/dist/series/timeline/TimelineChart.d.ts +23 -0
- package/dist/series/venn/VennChart.d.ts +28 -0
- package/dist/stock/DataGrouping.d.ts +21 -0
- package/dist/stock/Navigator.d.ts +25 -0
- package/dist/stock/RangeSelector.d.ts +9 -0
- package/dist/stock/StockController.d.ts +47 -0
- package/dist/stockcharts.d.ts +8 -0
- package/dist/streaming/StreamAdapter.d.ts +36 -0
- package/dist/types/datatable-options.d.ts +633 -0
- package/dist/types/options.d.ts +1333 -0
- package/dist/utils/CircularBuffer.d.ts +24 -0
- package/dist/utils/chartText.d.ts +18 -0
- package/dist/utils/color.d.ts +23 -0
- package/dist/utils/decimation.d.ts +19 -0
- package/dist/utils/deepMerge.d.ts +5 -0
- package/dist/utils/dom.d.ts +10 -0
- package/dist/utils/format.d.ts +42 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/math.d.ts +6 -0
- package/dist/utils/throttle.d.ts +2 -0
- package/package.json +95 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column state management: visibility, reordering, pinning.
|
|
3
|
+
*/
|
|
4
|
+
import type { InternalColumnDef, PinDirection } from '../../types/datatable-options';
|
|
5
|
+
import type { EventBus } from '../../core/EventBus';
|
|
6
|
+
export declare class ColumnManager {
|
|
7
|
+
private columns;
|
|
8
|
+
private events;
|
|
9
|
+
private responsiveHidden;
|
|
10
|
+
constructor(columns: InternalColumnDef[], events: EventBus);
|
|
11
|
+
getColumns(): InternalColumnDef[];
|
|
12
|
+
setColumns(columns: InternalColumnDef[]): void;
|
|
13
|
+
getVisibleColumns(): InternalColumnDef[];
|
|
14
|
+
showColumn(field: string): void;
|
|
15
|
+
hideColumn(field: string): void;
|
|
16
|
+
toggleColumn(field: string, visible: boolean): void;
|
|
17
|
+
pinColumn(field: string, direction: PinDirection): void;
|
|
18
|
+
reorderColumn(fromField: string, toIndex: number): void;
|
|
19
|
+
resizeColumn(field: string, width: number): void;
|
|
20
|
+
updateColumn(field: string, updates: Partial<InternalColumnDef>): void;
|
|
21
|
+
applyResponsiveHiding(containerWidth: number): string[];
|
|
22
|
+
setSortState(sort: Array<{
|
|
23
|
+
column: string;
|
|
24
|
+
direction: 'asc' | 'desc' | null;
|
|
25
|
+
}>): void;
|
|
26
|
+
setFilterValue(field: string, value: any): void;
|
|
27
|
+
clearFilters(): void;
|
|
28
|
+
private find;
|
|
29
|
+
private recalcPinning;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data processing pipeline: search → filter → group → sort → aggregate → paginate → virtual window.
|
|
3
|
+
*/
|
|
4
|
+
import type { InternalColumnDef, ProcessedResult, SortState, TreeDataOptions } from '../../types/datatable-options';
|
|
5
|
+
type DirtyStage = 'search' | 'filter' | 'group' | 'sort' | 'aggregate' | 'paginate' | 'window';
|
|
6
|
+
export interface ProcessorState {
|
|
7
|
+
search: string;
|
|
8
|
+
searchColumns: string[] | undefined;
|
|
9
|
+
caseSensitive: boolean;
|
|
10
|
+
filters: Record<string, any>;
|
|
11
|
+
sort: SortState[];
|
|
12
|
+
groupBy: string[];
|
|
13
|
+
groupExpanded: Map<string, boolean>;
|
|
14
|
+
page: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
paginationEnabled: boolean;
|
|
17
|
+
scrollTop: number;
|
|
18
|
+
viewportHeight: number;
|
|
19
|
+
virtualEnabled: boolean;
|
|
20
|
+
virtualRowHeight: number;
|
|
21
|
+
virtualOverscan: number;
|
|
22
|
+
treeData?: TreeDataOptions;
|
|
23
|
+
}
|
|
24
|
+
export declare class DataProcessor {
|
|
25
|
+
private caches;
|
|
26
|
+
private dirtyFrom;
|
|
27
|
+
invalidate(fromStage: DirtyStage): void;
|
|
28
|
+
invalidateAll(): void;
|
|
29
|
+
process(rawData: any[], columns: InternalColumnDef[], state: ProcessorState): ProcessedResult;
|
|
30
|
+
private shouldRun;
|
|
31
|
+
private applySearch;
|
|
32
|
+
private applyFilters;
|
|
33
|
+
private matchesFilter;
|
|
34
|
+
private inferFilterType;
|
|
35
|
+
private applySorting;
|
|
36
|
+
private defaultCompare;
|
|
37
|
+
private reinterlaceGrouped;
|
|
38
|
+
private applyGrouping;
|
|
39
|
+
private flattenTree;
|
|
40
|
+
private applyPagination;
|
|
41
|
+
private applyVirtualWindow;
|
|
42
|
+
private computeAggregates;
|
|
43
|
+
private extractGroups;
|
|
44
|
+
private makeDataRow;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data loading and normalization from various sources.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataTableOptions, ServerSideRequestParams } from '../../types/datatable-options';
|
|
5
|
+
export interface DataSourceResult {
|
|
6
|
+
data: any[];
|
|
7
|
+
total: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class DataSource {
|
|
10
|
+
private rawData;
|
|
11
|
+
private options;
|
|
12
|
+
constructor(options: DataTableOptions);
|
|
13
|
+
loadSync(): DataSourceResult;
|
|
14
|
+
load(): Promise<DataSourceResult>;
|
|
15
|
+
loadServerSide(params: ServerSideRequestParams): Promise<DataSourceResult>;
|
|
16
|
+
setData(data: any[]): DataSourceResult;
|
|
17
|
+
getData(): any[];
|
|
18
|
+
addRow(row: any, index?: number): void;
|
|
19
|
+
removeRow(index: number): any | undefined;
|
|
20
|
+
updateRow(index: number, data: Partial<any>): void;
|
|
21
|
+
updateCell(rowIndex: number, field: string, value: any): void;
|
|
22
|
+
private normalizeData;
|
|
23
|
+
private normalizeRow;
|
|
24
|
+
private extractChartData;
|
|
25
|
+
updateOptions(options: DataTableOptions): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline cell editing with built-in and custom editors.
|
|
3
|
+
*/
|
|
4
|
+
import type { InternalColumnDef, EditingOptions } from '../../types/datatable-options';
|
|
5
|
+
import type { EventBus } from '../../core/EventBus';
|
|
6
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
7
|
+
export declare class CellEditor {
|
|
8
|
+
private events;
|
|
9
|
+
private theme;
|
|
10
|
+
private options;
|
|
11
|
+
private activeEditor;
|
|
12
|
+
constructor(events: EventBus, theme: TableTheme, options: EditingOptions);
|
|
13
|
+
startEditing(td: HTMLTableCellElement, value: any, row: any, column: InternalColumnDef, rowIndex: number): void;
|
|
14
|
+
private createEditor;
|
|
15
|
+
private createTextEditor;
|
|
16
|
+
private createNumberEditor;
|
|
17
|
+
private createSelectEditor;
|
|
18
|
+
private createDateEditor;
|
|
19
|
+
private createCheckboxEditor;
|
|
20
|
+
private styleEditorInput;
|
|
21
|
+
private attachEditorEvents;
|
|
22
|
+
commit(): void;
|
|
23
|
+
cancel(): void;
|
|
24
|
+
private commitOrCancel;
|
|
25
|
+
private showValidationError;
|
|
26
|
+
isEditing(): boolean;
|
|
27
|
+
private inferEditorType;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table data export to CSV, JSON, clipboard, and HTML.
|
|
3
|
+
*/
|
|
4
|
+
import type { ExportTableOptions, InternalColumnDef } from '../../types/datatable-options';
|
|
5
|
+
export declare class TableExport {
|
|
6
|
+
static exportCSV(data: any[], columns: InternalColumnDef[], options?: ExportTableOptions['csv'], filename?: string): void;
|
|
7
|
+
static exportJSON(data: any[], columns: InternalColumnDef[], options?: ExportTableOptions['json'], filename?: string): void;
|
|
8
|
+
static copyToClipboard(data: any[], columns: InternalColumnDef[]): void;
|
|
9
|
+
static exportHTML(data: any[], columns: InternalColumnDef[], filename?: string): void;
|
|
10
|
+
static toCSV(data: any[], columns: InternalColumnDef[], options?: ExportTableOptions['csv']): string;
|
|
11
|
+
static toJSON(data: any[], columns: InternalColumnDef[], options?: ExportTableOptions['json']): string;
|
|
12
|
+
static toHTML(data: any[], columns: InternalColumnDef[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Escapes a CSV field: neutralizes spreadsheet formula injection by prefixing
|
|
15
|
+
* cells that begin with =, +, -, @, tab or CR with a single quote (plain
|
|
16
|
+
* numbers exempted), then quotes per RFC 4180 when the field contains the
|
|
17
|
+
* delimiter, a double quote, or a line break.
|
|
18
|
+
*/
|
|
19
|
+
private static escapeCSV;
|
|
20
|
+
private static escapeHTML;
|
|
21
|
+
private static downloadBlob;
|
|
22
|
+
private static fallbackCopy;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English locale pack — the base/fallback for every other locale.
|
|
3
|
+
*
|
|
4
|
+
* This pack is complete: it populates every key in DataTableLangOptions and is
|
|
5
|
+
* the single source of truth for English defaults. resolveLocale always starts
|
|
6
|
+
* from this pack, so partial packs only need to list the strings they translate.
|
|
7
|
+
*/
|
|
8
|
+
import type { DataTableLangOptions } from '../../types/datatable-options';
|
|
9
|
+
export declare const enLocale: Required<DataTableLangOptions>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spanish locale pack. Partial: any key not listed here falls back to the
|
|
3
|
+
* English base. Language-neutral pagination glyphs are intentionally omitted.
|
|
4
|
+
*/
|
|
5
|
+
import type { DataTableLangOptions } from '../../types/datatable-options';
|
|
6
|
+
export declare const esLocale: Partial<DataTableLangOptions>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in locale registry and lookup for the DataTable.
|
|
3
|
+
*
|
|
4
|
+
* Ships English (base), Brazilian Portuguese, Spanish and Simplified Chinese.
|
|
5
|
+
* `registerLocale` lets callers add or override packs for additional languages.
|
|
6
|
+
*/
|
|
7
|
+
import type { DataTableLangOptions } from '../../types/datatable-options';
|
|
8
|
+
import { enLocale } from './en';
|
|
9
|
+
import { ptBRLocale } from './pt-BR';
|
|
10
|
+
import { esLocale } from './es';
|
|
11
|
+
import { zhLocale } from './zh';
|
|
12
|
+
/**
|
|
13
|
+
* Register (or replace) a locale pack so it can be selected via the `locale`
|
|
14
|
+
* option or matched during auto-detection.
|
|
15
|
+
*
|
|
16
|
+
* @param code BCP 47 language tag, e.g. `'fr'` or `'de-DE'`.
|
|
17
|
+
* @param pack Strings for that locale; omitted keys fall back to English.
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerLocale(code: string, pack: Partial<DataTableLangOptions>): void;
|
|
20
|
+
/** Return the registered pack for a locale code, or `undefined` when unknown. */
|
|
21
|
+
export declare function getLocalePack(code: string): Partial<DataTableLangOptions> | undefined;
|
|
22
|
+
export { enLocale, ptBRLocale, esLocale, zhLocale };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brazilian Portuguese locale pack. Partial: any key not listed here falls back
|
|
3
|
+
* to the English base. Language-neutral pagination glyphs are intentionally omitted.
|
|
4
|
+
*/
|
|
5
|
+
import type { DataTableLangOptions } from '../../types/datatable-options';
|
|
6
|
+
export declare const ptBRLocale: Partial<DataTableLangOptions>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the effective set of UI strings for a DataTable instance.
|
|
3
|
+
*
|
|
4
|
+
* Precedence (lowest to highest): English base pack, the matched locale pack,
|
|
5
|
+
* then per-key `lang` overrides. When no locale is given (or `'auto'`), the
|
|
6
|
+
* browser language is detected; an explicit locale pins the language and skips
|
|
7
|
+
* detection entirely.
|
|
8
|
+
*/
|
|
9
|
+
import type { DataTableLangOptions } from '../../types/datatable-options';
|
|
10
|
+
export interface ResolveLocaleOptions {
|
|
11
|
+
/** Explicit locale code, or `'auto'`/omitted to detect from the browser. */
|
|
12
|
+
locale?: string;
|
|
13
|
+
/** Per-key string overrides that win over the resolved locale pack. */
|
|
14
|
+
langOverrides?: Partial<DataTableLangOptions>;
|
|
15
|
+
}
|
|
16
|
+
export declare function resolveLocale(opts?: ResolveLocaleOptions): Required<DataTableLangOptions>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simplified Chinese locale pack. Partial: any key not listed here falls back to
|
|
3
|
+
* the English base. Language-neutral pagination glyphs are intentionally omitted.
|
|
4
|
+
*/
|
|
5
|
+
import type { DataTableLangOptions } from '../../types/datatable-options';
|
|
6
|
+
export declare const zhLocale: Partial<DataTableLangOptions>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cell value formatting and rendering.
|
|
3
|
+
*/
|
|
4
|
+
import type { InternalColumnDef, ProcessedRow } from '../../types/datatable-options';
|
|
5
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
6
|
+
import type { TableApi } from '../api/TableApi';
|
|
7
|
+
import type { TableHost } from '../api/TableApi';
|
|
8
|
+
export declare class CellRenderer {
|
|
9
|
+
private theme;
|
|
10
|
+
private formatters;
|
|
11
|
+
private api;
|
|
12
|
+
private host;
|
|
13
|
+
constructor(theme: TableTheme, formatters?: Record<string, (value: any) => string>);
|
|
14
|
+
setApi(api: TableApi | null, host: TableHost | null): void;
|
|
15
|
+
createCell(tr: HTMLTableRowElement, value: any, row: ProcessedRow, col: InternalColumnDef, rowIndex: number): HTMLTableCellElement;
|
|
16
|
+
private formatValue;
|
|
17
|
+
private defaultNumberFormat;
|
|
18
|
+
private defaultDateFormat;
|
|
19
|
+
private defaultBooleanFormat;
|
|
20
|
+
private computeClass;
|
|
21
|
+
private computeTooltip;
|
|
22
|
+
updateFormatters(formatters: Record<string, (value: any) => string>): void;
|
|
23
|
+
resolveValue(row: any, col: InternalColumnDef): any;
|
|
24
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table header rendering with sort indicators, filter inputs, and resize handles.
|
|
3
|
+
*/
|
|
4
|
+
import type { InternalColumnDef, HeaderGroupDefinition, DataTableLangOptions } from '../../types/datatable-options';
|
|
5
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
6
|
+
import type { EventBus } from '../../core/EventBus';
|
|
7
|
+
import type { TableApi, TableHost } from '../api/TableApi';
|
|
8
|
+
interface HeaderOptions {
|
|
9
|
+
sortingEnabled: boolean;
|
|
10
|
+
filteringEnabled: boolean;
|
|
11
|
+
filterPosition: string;
|
|
12
|
+
resizingEnabled: boolean;
|
|
13
|
+
selectionCheckbox: boolean;
|
|
14
|
+
headerGroups?: HeaderGroupDefinition[];
|
|
15
|
+
api?: TableApi | null;
|
|
16
|
+
host?: TableHost | null;
|
|
17
|
+
}
|
|
18
|
+
export declare class HeaderRenderer {
|
|
19
|
+
private theme;
|
|
20
|
+
private events;
|
|
21
|
+
private lang;
|
|
22
|
+
private thead;
|
|
23
|
+
private filterRow;
|
|
24
|
+
private resizing;
|
|
25
|
+
private api;
|
|
26
|
+
private host;
|
|
27
|
+
constructor(theme: TableTheme, events: EventBus, lang?: DataTableLangOptions);
|
|
28
|
+
/** Swap the active locale strings; takes effect on the next render. */
|
|
29
|
+
setLang(lang: DataTableLangOptions): void;
|
|
30
|
+
render(table: HTMLTableElement, columns: InternalColumnDef[], options: HeaderOptions): HTMLTableSectionElement;
|
|
31
|
+
private createHeaderCell;
|
|
32
|
+
private createSortIcon;
|
|
33
|
+
private createResizeHandle;
|
|
34
|
+
private createCheckboxHeader;
|
|
35
|
+
private createFilterRow;
|
|
36
|
+
private createFilterInput;
|
|
37
|
+
private createTextFilter;
|
|
38
|
+
private createNumberFilter;
|
|
39
|
+
private createDateFilter;
|
|
40
|
+
private createSelectFilter;
|
|
41
|
+
private createBooleanFilter;
|
|
42
|
+
/** A single-select column filter rendered as a themed dropdown (not a native <select>). */
|
|
43
|
+
private createSingleSelectFilter;
|
|
44
|
+
/** A faceted multi-select filter: button + checkbox menu. */
|
|
45
|
+
private createFacetedFilter;
|
|
46
|
+
private renderHeaderGroups;
|
|
47
|
+
private inferFilterType;
|
|
48
|
+
updateSelectAllCheckbox(allSelected: boolean, someSelected: boolean): void;
|
|
49
|
+
destroy(): void;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pagination controls rendering and state.
|
|
3
|
+
*/
|
|
4
|
+
import type { PaginationOptions, PageInfo, DataTableLangOptions } from '../../types/datatable-options';
|
|
5
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
6
|
+
import type { EventBus } from '../../core/EventBus';
|
|
7
|
+
export declare class PaginationRenderer {
|
|
8
|
+
private theme;
|
|
9
|
+
private events;
|
|
10
|
+
private container;
|
|
11
|
+
private lang;
|
|
12
|
+
private pageSizePopover;
|
|
13
|
+
constructor(theme: TableTheme, events: EventBus, lang?: DataTableLangOptions);
|
|
14
|
+
/** Swap the active locale strings; takes effect on the next render. */
|
|
15
|
+
setLang(lang: DataTableLangOptions): void;
|
|
16
|
+
render(parent: HTMLElement, pageInfo: PageInfo, options: PaginationOptions): HTMLDivElement;
|
|
17
|
+
private createButton;
|
|
18
|
+
private createIconButton;
|
|
19
|
+
private createTextButton;
|
|
20
|
+
private createPageSizeSelector;
|
|
21
|
+
private closePageSizeMenu;
|
|
22
|
+
private getPageNumbers;
|
|
23
|
+
private formatPageInfo;
|
|
24
|
+
update(pageInfo: PageInfo, options: PaginationOptions, parent: HTMLElement): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global search input rendering.
|
|
3
|
+
*/
|
|
4
|
+
import type { SearchOptions, DataTableLangOptions } from '../../types/datatable-options';
|
|
5
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
6
|
+
import type { EventBus } from '../../core/EventBus';
|
|
7
|
+
export declare class SearchRenderer {
|
|
8
|
+
private theme;
|
|
9
|
+
private events;
|
|
10
|
+
private lang;
|
|
11
|
+
private input;
|
|
12
|
+
private container;
|
|
13
|
+
constructor(theme: TableTheme, events: EventBus, lang?: DataTableLangOptions);
|
|
14
|
+
/** Swap the active locale strings; takes effect on the next render. */
|
|
15
|
+
setLang(lang: DataTableLangOptions): void;
|
|
16
|
+
render(parent: HTMLElement, options: SearchOptions): HTMLDivElement;
|
|
17
|
+
setValue(query: string): void;
|
|
18
|
+
getValue(): string;
|
|
19
|
+
focus(): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main HTML table rendering engine with virtual scrolling support.
|
|
3
|
+
*/
|
|
4
|
+
import type { InternalColumnDef, ProcessedResult, GroupingOptions, MasterDetailOptions, TreeDataOptions, VirtualScrollOptions, SelectionMode, DataTableLangOptions } from '../../types/datatable-options';
|
|
5
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
6
|
+
import type { EventBus } from '../../core/EventBus';
|
|
7
|
+
import type { TableApi, TableHost } from '../api/TableApi';
|
|
8
|
+
import { HeaderRenderer } from './HeaderRenderer';
|
|
9
|
+
interface RenderOptions {
|
|
10
|
+
height?: number | string;
|
|
11
|
+
sortingEnabled: boolean;
|
|
12
|
+
filteringEnabled: boolean;
|
|
13
|
+
filterPosition: string;
|
|
14
|
+
resizingEnabled: boolean;
|
|
15
|
+
selectionMode: SelectionMode;
|
|
16
|
+
selectionCheckbox: boolean;
|
|
17
|
+
grouping?: GroupingOptions;
|
|
18
|
+
masterDetail?: MasterDetailOptions;
|
|
19
|
+
treeData?: TreeDataOptions;
|
|
20
|
+
virtualScroll?: VirtualScrollOptions;
|
|
21
|
+
headerGroups?: any[];
|
|
22
|
+
selectedIndices: Set<number>;
|
|
23
|
+
noDataText: string;
|
|
24
|
+
loadingText: string;
|
|
25
|
+
api?: TableApi | null;
|
|
26
|
+
host?: TableHost | null;
|
|
27
|
+
bodyClass?: string;
|
|
28
|
+
tableClass?: string;
|
|
29
|
+
}
|
|
30
|
+
interface UpdateOptions {
|
|
31
|
+
selectionMode: SelectionMode;
|
|
32
|
+
selectionCheckbox: boolean;
|
|
33
|
+
grouping?: GroupingOptions;
|
|
34
|
+
masterDetail?: MasterDetailOptions;
|
|
35
|
+
treeData?: TreeDataOptions;
|
|
36
|
+
selectedIndices: Set<number>;
|
|
37
|
+
noDataText: string;
|
|
38
|
+
api?: TableApi | null;
|
|
39
|
+
host?: TableHost | null;
|
|
40
|
+
}
|
|
41
|
+
export declare class TableRenderer {
|
|
42
|
+
private theme;
|
|
43
|
+
private events;
|
|
44
|
+
private lang;
|
|
45
|
+
private cellRenderer;
|
|
46
|
+
private headerRenderer;
|
|
47
|
+
private tableContainer;
|
|
48
|
+
private headerScrollContainer;
|
|
49
|
+
private bodyScrollContainer;
|
|
50
|
+
private headerTable;
|
|
51
|
+
private bodyTable;
|
|
52
|
+
private tbody;
|
|
53
|
+
private colgroup;
|
|
54
|
+
private headerColgroup;
|
|
55
|
+
private spacer;
|
|
56
|
+
private loadingOverlay;
|
|
57
|
+
private currentRows;
|
|
58
|
+
private virtualEnabled;
|
|
59
|
+
private virtualRowHeight;
|
|
60
|
+
private virtualOverscan;
|
|
61
|
+
private totalRows;
|
|
62
|
+
constructor(theme: TableTheme, events: EventBus, formatters?: Record<string, (value: any) => string>, lang?: DataTableLangOptions);
|
|
63
|
+
/** Swap the active locale strings; takes effect on the next render. */
|
|
64
|
+
setLang(lang: DataTableLangOptions): void;
|
|
65
|
+
render(parent: HTMLElement, columns: InternalColumnDef[], result: ProcessedResult, options: RenderOptions): void;
|
|
66
|
+
updateRows(result: ProcessedResult, columns: InternalColumnDef[], options: UpdateOptions): void;
|
|
67
|
+
private renderRows;
|
|
68
|
+
private renderGroupHeader;
|
|
69
|
+
private renderDetailRow;
|
|
70
|
+
private renderNoData;
|
|
71
|
+
private createColgroup;
|
|
72
|
+
updateVirtualPosition(scrollTop: number): void;
|
|
73
|
+
showLoading(text?: string): void;
|
|
74
|
+
hideLoading(): void;
|
|
75
|
+
scrollToRow(index: number): void;
|
|
76
|
+
getHeaderRenderer(): HeaderRenderer;
|
|
77
|
+
getBodyScrollContainer(): HTMLDivElement | null;
|
|
78
|
+
private cleanup;
|
|
79
|
+
destroy(): void;
|
|
80
|
+
}
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toolbar rendering with search, column toggle, export, density and reset controls.
|
|
3
|
+
*/
|
|
4
|
+
import type { ToolbarOptions, SearchOptions, ExportTableOptions, InternalColumnDef, DataTableLangOptions } from '../../types/datatable-options';
|
|
5
|
+
import type { TableTheme } from '../themes/TableTheme';
|
|
6
|
+
import type { EventBus } from '../../core/EventBus';
|
|
7
|
+
import { SearchRenderer } from './SearchRenderer';
|
|
8
|
+
export declare class ToolbarRenderer {
|
|
9
|
+
private theme;
|
|
10
|
+
private events;
|
|
11
|
+
private container;
|
|
12
|
+
private searchRenderer;
|
|
13
|
+
private lang;
|
|
14
|
+
private popover;
|
|
15
|
+
private hasActiveFilters;
|
|
16
|
+
private resetButton;
|
|
17
|
+
constructor(theme: TableTheme, events: EventBus, lang?: DataTableLangOptions);
|
|
18
|
+
/** Swap the active locale strings; takes effect on the next render. */
|
|
19
|
+
setLang(lang: DataTableLangOptions): void;
|
|
20
|
+
setActiveFilters(active: boolean): void;
|
|
21
|
+
/** Toggle the reset button live, without re-rendering the toolbar. */
|
|
22
|
+
setResetVisible(visible: boolean): void;
|
|
23
|
+
render(parent: HTMLElement, options: ToolbarOptions, searchOptions: SearchOptions, exportOptions: ExportTableOptions, columns: InternalColumnDef[]): HTMLDivElement;
|
|
24
|
+
private button;
|
|
25
|
+
private createResetButton;
|
|
26
|
+
private toggleMenu;
|
|
27
|
+
private createColumnToggle;
|
|
28
|
+
private createExportDropdown;
|
|
29
|
+
private createDensityToggle;
|
|
30
|
+
private createFullscreenButton;
|
|
31
|
+
private closeDropdown;
|
|
32
|
+
getSearchRenderer(): SearchRenderer;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline SVG icons (Lucide-style) used across the DataTable chrome.
|
|
3
|
+
* Returned as markup strings so they can be dropped into `innerHTML`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ICONS: {
|
|
6
|
+
readonly sortAsc: string;
|
|
7
|
+
readonly sortDesc: string;
|
|
8
|
+
readonly sortNone: string;
|
|
9
|
+
readonly search: string;
|
|
10
|
+
readonly columns: string;
|
|
11
|
+
readonly download: string;
|
|
12
|
+
readonly sliders: string;
|
|
13
|
+
readonly expand: string;
|
|
14
|
+
readonly check: string;
|
|
15
|
+
readonly x: string;
|
|
16
|
+
readonly chevronLeft: string;
|
|
17
|
+
readonly chevronRight: string;
|
|
18
|
+
readonly chevronDown: string;
|
|
19
|
+
readonly chevronsUpDown: string;
|
|
20
|
+
readonly chevronsLeft: string;
|
|
21
|
+
readonly chevronsRight: string;
|
|
22
|
+
readonly plusCircle: string;
|
|
23
|
+
};
|
|
24
|
+
export type IconName = keyof typeof ICONS;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight body-level popover positioning.
|
|
3
|
+
*
|
|
4
|
+
* Dropdowns and faceted filters are portalled to <body> so they are never
|
|
5
|
+
* clipped by the table's `overflow:hidden` scroll containers. Because the menu
|
|
6
|
+
* then lives outside the themed root, the active `--kdt-*` custom properties
|
|
7
|
+
* are copied onto it so dark/branded themes are preserved.
|
|
8
|
+
*/
|
|
9
|
+
export interface PopoverHandle {
|
|
10
|
+
element: HTMLElement;
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function openPopover(anchor: HTMLElement, content: HTMLElement, opts?: {
|
|
14
|
+
align?: 'left' | 'right';
|
|
15
|
+
}): PopoverHandle;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row selection state management.
|
|
3
|
+
*/
|
|
4
|
+
import type { SelectionMode, ProcessedRow } from '../../types/datatable-options';
|
|
5
|
+
import type { EventBus } from '../../core/EventBus';
|
|
6
|
+
export declare class SelectionManager {
|
|
7
|
+
private mode;
|
|
8
|
+
private selectedIndices;
|
|
9
|
+
private events;
|
|
10
|
+
private preserveOnFilter;
|
|
11
|
+
private lastClickedIndex;
|
|
12
|
+
constructor(mode: SelectionMode, events: EventBus, preserveOnFilter?: boolean);
|
|
13
|
+
handleRowClick(rowIndex: number, row: any, event: MouseEvent): void;
|
|
14
|
+
handleCheckboxToggle(rowIndex: number, row: any, checked: boolean): void;
|
|
15
|
+
selectAll(rows: ProcessedRow[]): void;
|
|
16
|
+
deselectAll(): void;
|
|
17
|
+
selectRow(index: number | number[]): void;
|
|
18
|
+
deselectRow(index: number | number[]): void;
|
|
19
|
+
isSelected(index: number): boolean;
|
|
20
|
+
getSelectedIndices(): number[];
|
|
21
|
+
getSelectedData(allData: any[]): any[];
|
|
22
|
+
getCount(): number;
|
|
23
|
+
isAllSelected(totalVisible: number): boolean;
|
|
24
|
+
isSomeSelected(): boolean;
|
|
25
|
+
clearOnFilter(): void;
|
|
26
|
+
setMode(mode: SelectionMode): void;
|
|
27
|
+
private emitChange;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme resolution for the DataTable.
|
|
3
|
+
*
|
|
4
|
+
* Visuals live in the injected stylesheet (see styleSheet.ts). This class only
|
|
5
|
+
* translates `DataTableStyleOptions` into the two override channels CSS reads:
|
|
6
|
+
* - `cssVariables()` — `--kdt-*` custom properties set on the root element.
|
|
7
|
+
* - `rootDataset()` — `data-*` flags (theme, density, borders, striping).
|
|
8
|
+
* Explicit per-part style objects the user supplies (headerCellStyle,
|
|
9
|
+
* cellStyle, rowStyle, …) are surfaced verbatim so renderers can apply them
|
|
10
|
+
* inline as the highest-priority override.
|
|
11
|
+
*/
|
|
12
|
+
import type { CSSObject, DataTableStyleOptions, DensityMode, LayoutStyle, RowStyleContext } from '../../types/datatable-options';
|
|
13
|
+
export declare class TableTheme {
|
|
14
|
+
private style;
|
|
15
|
+
private layout;
|
|
16
|
+
constructor(style?: DataTableStyleOptions);
|
|
17
|
+
get density(): DensityMode;
|
|
18
|
+
get rowHeight(): number;
|
|
19
|
+
get headerHeight(): number;
|
|
20
|
+
getLayout(): LayoutStyle;
|
|
21
|
+
/**
|
|
22
|
+
* CSS custom properties applied to the root element, derived from style
|
|
23
|
+
* options. Anything left unset falls back to the stylesheet defaults.
|
|
24
|
+
*/
|
|
25
|
+
cssVariables(width?: number | string, height?: number | string): Record<string, string>;
|
|
26
|
+
/** `data-*` flags applied to the root element. */
|
|
27
|
+
rootDataset(): Record<string, string>;
|
|
28
|
+
get userContainerStyle(): CSSObject | undefined;
|
|
29
|
+
get userTableStyle(): CSSObject | undefined;
|
|
30
|
+
get userHeaderRowStyle(): CSSObject | undefined;
|
|
31
|
+
get userHeaderCellStyle(): CSSObject | undefined;
|
|
32
|
+
get userBodyStyle(): CSSObject | undefined;
|
|
33
|
+
get userCellStyle(): CSSObject | undefined;
|
|
34
|
+
rowStyle(ctx: RowStyleContext): CSSObject | undefined;
|
|
35
|
+
update(style: DataTableStyleOptions): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injected default stylesheet for the DataTable.
|
|
3
|
+
*
|
|
4
|
+
* The whole visual layer is expressed through low-specificity class selectors
|
|
5
|
+
* driven by `--kdt-*` custom properties. This is what makes the table both
|
|
6
|
+
* good-looking out of the box (a modern, neutral theme) and
|
|
7
|
+
* trivially overridable: consumers can re-theme by setting a single CSS
|
|
8
|
+
* variable, or restyle any part by targeting its stable class name — no
|
|
9
|
+
* `!important` required, because the renderers no longer hard-code visuals
|
|
10
|
+
* as inline styles.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DATATABLE_STYLE_ID = "katucharts-datatable-styles";
|
|
13
|
+
/**
|
|
14
|
+
* Injects the shared stylesheet into <head> exactly once per document.
|
|
15
|
+
*/
|
|
16
|
+
export declare function injectDataTableStyles(doc?: Document): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KatuCharts DataTable module.
|
|
3
|
+
*
|
|
4
|
+
* Standalone usage:
|
|
5
|
+
* import { DataTable } from 'katucharts/datatable';
|
|
6
|
+
* const table = new DataTable('#container', { data: [...] });
|
|
7
|
+
*
|
|
8
|
+
* With KatuCharts:
|
|
9
|
+
* import { DataTableModule } from 'katucharts/datatable';
|
|
10
|
+
* KatuCharts.use(DataTableModule);
|
|
11
|
+
* KatuCharts.dataTable('#container', { ... });
|
|
12
|
+
*/
|
|
13
|
+
import { DataTable } from './datatable/DataTable';
|
|
14
|
+
import type { ModuleDefinition } from './core/Registry';
|
|
15
|
+
export declare const DataTableModule: ModuleDefinition;
|
|
16
|
+
export { DataTable };
|
|
17
|
+
export { registerLocale } from './datatable/locales';
|
|
18
|
+
export { resolveLocale } from './datatable/locales/resolveLocale';
|
|
19
|
+
export type { DataTableOptions, ColumnDefinition, ColumnType, SortDirection, FilterType, SelectionMode, PinDirection, DensityMode, LayoutStyle, DataTableEventsOptions, PaginationOptions, SearchOptions, ToolbarOptions, ExportTableOptions, ServerSideOptions, VirtualScrollOptions, GroupingOptions, MasterDetailOptions, TreeDataOptions, ContextMenuOptions, ContextMenuItem, DataTableStyleOptions, DataTableClassNames, DataTableLangOptions, SortingOptions, FilteringOptions, SelectionOptions, EditingOptions, HeaderGroupDefinition, InternalColumnDef, ProcessedRow, ProcessedResult, PageInfo, SortState, FormatterContext, CellStyleContext, RowStyleContext, CustomEditorFn, CustomEditorResult, ColumnApi, RowApi, TableApi, HeaderContext, CellContext, HeaderRenderFn, CellRenderFn, ColumnFilterFn, } from './types/datatable-options';
|