@ekz/blueprintjs 0.1.0 → 0.2.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 (183) hide show
  1. package/package.json +12 -13
  2. package/lib/cjs/common/classes.d.ts +0 -28
  3. package/lib/cjs/common/classes.js +0 -34
  4. package/lib/cjs/common/classes.js.map +0 -1
  5. package/lib/cjs/common/index.d.ts +0 -3
  6. package/lib/cjs/common/index.js +0 -9
  7. package/lib/cjs/common/index.js.map +0 -1
  8. package/lib/cjs/components/pagination/index.d.ts +0 -1
  9. package/lib/cjs/components/pagination/index.js +0 -5
  10. package/lib/cjs/components/pagination/index.js.map +0 -1
  11. package/lib/cjs/components/pagination/pagination.d.ts +0 -46
  12. package/lib/cjs/components/pagination/pagination.js +0 -57
  13. package/lib/cjs/components/pagination/pagination.js.map +0 -1
  14. package/lib/cjs/components/table/columnFilter.d.ts +0 -7
  15. package/lib/cjs/components/table/columnFilter.js +0 -22
  16. package/lib/cjs/components/table/columnFilter.js.map +0 -1
  17. package/lib/cjs/components/table/columnHelpers.d.ts +0 -340
  18. package/lib/cjs/components/table/columnHelpers.js +0 -42
  19. package/lib/cjs/components/table/columnHelpers.js.map +0 -1
  20. package/lib/cjs/components/table/headerGroup.d.ts +0 -8
  21. package/lib/cjs/components/table/headerGroup.js +0 -49
  22. package/lib/cjs/components/table/headerGroup.js.map +0 -1
  23. package/lib/cjs/components/table/index.d.ts +0 -9
  24. package/lib/cjs/components/table/index.js +0 -20
  25. package/lib/cjs/components/table/index.js.map +0 -1
  26. package/lib/cjs/components/table/reactTableBase.d.ts +0 -2
  27. package/lib/cjs/components/table/reactTableBase.js +0 -8
  28. package/lib/cjs/components/table/reactTableBase.js.map +0 -1
  29. package/lib/cjs/components/table/table.d.ts +0 -123
  30. package/lib/cjs/components/table/table.js +0 -243
  31. package/lib/cjs/components/table/table.js.map +0 -1
  32. package/lib/cjs/components/table/tableMessages.d.ts +0 -6
  33. package/lib/cjs/components/table/tableMessages.js +0 -11
  34. package/lib/cjs/components/table/tableMessages.js.map +0 -1
  35. package/lib/cjs/components/table/theme.d.ts +0 -4
  36. package/lib/cjs/components/table/theme.js +0 -9
  37. package/lib/cjs/components/table/theme.js.map +0 -1
  38. package/lib/cjs/components/table/useAutoColumnSizer.d.ts +0 -7
  39. package/lib/cjs/components/table/useAutoColumnSizer.js +0 -52
  40. package/lib/cjs/components/table/useAutoColumnSizer.js.map +0 -1
  41. package/lib/cjs/components/table/useAutoHeight.d.ts +0 -4
  42. package/lib/cjs/components/table/useAutoHeight.js +0 -70
  43. package/lib/cjs/components/table/useAutoHeight.js.map +0 -1
  44. package/lib/cjs/components/table/useGroupedHeaderColumnSizer.d.ts +0 -2
  45. package/lib/cjs/components/table/useGroupedHeaderColumnSizer.js +0 -57
  46. package/lib/cjs/components/table/useGroupedHeaderColumnSizer.js.map +0 -1
  47. package/lib/cjs/components/table/useTable.d.ts +0 -122
  48. package/lib/cjs/components/table/useTable.js +0 -31
  49. package/lib/cjs/components/table/useTable.js.map +0 -1
  50. package/lib/cjs/components/table/useTableExport.d.ts +0 -6
  51. package/lib/cjs/components/table/useTableExport.js +0 -41
  52. package/lib/cjs/components/table/useTableExport.js.map +0 -1
  53. package/lib/cjs/components/table/useTableState.d.ts +0 -3
  54. package/lib/cjs/components/table/useTableState.js +0 -14
  55. package/lib/cjs/components/table/useTableState.js.map +0 -1
  56. package/lib/cjs/components/table/utils.d.ts +0 -1
  57. package/lib/cjs/components/table/utils.js +0 -8
  58. package/lib/cjs/components/table/utils.js.map +0 -1
  59. package/lib/cjs/index.d.ts +0 -3
  60. package/lib/cjs/index.js +0 -7
  61. package/lib/cjs/index.js.map +0 -1
  62. package/lib/css/blueprintjs.css +0 -345
  63. package/lib/css/blueprintjs.css.map +0 -1
  64. package/lib/esm/common/classes.d.ts +0 -28
  65. package/lib/esm/common/classes.js +0 -31
  66. package/lib/esm/common/classes.js.map +0 -1
  67. package/lib/esm/common/index.d.ts +0 -3
  68. package/lib/esm/common/index.js +0 -4
  69. package/lib/esm/common/index.js.map +0 -1
  70. package/lib/esm/components/pagination/index.d.ts +0 -1
  71. package/lib/esm/components/pagination/index.js +0 -2
  72. package/lib/esm/components/pagination/index.js.map +0 -1
  73. package/lib/esm/components/pagination/pagination.d.ts +0 -46
  74. package/lib/esm/components/pagination/pagination.js +0 -53
  75. package/lib/esm/components/pagination/pagination.js.map +0 -1
  76. package/lib/esm/components/table/columnFilter.d.ts +0 -7
  77. package/lib/esm/components/table/columnFilter.js +0 -17
  78. package/lib/esm/components/table/columnFilter.js.map +0 -1
  79. package/lib/esm/components/table/columnHelpers.d.ts +0 -340
  80. package/lib/esm/components/table/columnHelpers.js +0 -37
  81. package/lib/esm/components/table/columnHelpers.js.map +0 -1
  82. package/lib/esm/components/table/headerGroup.d.ts +0 -8
  83. package/lib/esm/components/table/headerGroup.js +0 -44
  84. package/lib/esm/components/table/headerGroup.js.map +0 -1
  85. package/lib/esm/components/table/index.d.ts +0 -9
  86. package/lib/esm/components/table/index.js +0 -10
  87. package/lib/esm/components/table/index.js.map +0 -1
  88. package/lib/esm/components/table/reactTableBase.d.ts +0 -2
  89. package/lib/esm/components/table/reactTableBase.js +0 -3
  90. package/lib/esm/components/table/reactTableBase.js.map +0 -1
  91. package/lib/esm/components/table/table.d.ts +0 -123
  92. package/lib/esm/components/table/table.js +0 -239
  93. package/lib/esm/components/table/table.js.map +0 -1
  94. package/lib/esm/components/table/tableMessages.d.ts +0 -6
  95. package/lib/esm/components/table/tableMessages.js +0 -6
  96. package/lib/esm/components/table/tableMessages.js.map +0 -1
  97. package/lib/esm/components/table/theme.d.ts +0 -4
  98. package/lib/esm/components/table/theme.js +0 -6
  99. package/lib/esm/components/table/theme.js.map +0 -1
  100. package/lib/esm/components/table/useAutoColumnSizer.d.ts +0 -7
  101. package/lib/esm/components/table/useAutoColumnSizer.js +0 -47
  102. package/lib/esm/components/table/useAutoColumnSizer.js.map +0 -1
  103. package/lib/esm/components/table/useAutoHeight.d.ts +0 -4
  104. package/lib/esm/components/table/useAutoHeight.js +0 -66
  105. package/lib/esm/components/table/useAutoHeight.js.map +0 -1
  106. package/lib/esm/components/table/useGroupedHeaderColumnSizer.d.ts +0 -2
  107. package/lib/esm/components/table/useGroupedHeaderColumnSizer.js +0 -53
  108. package/lib/esm/components/table/useGroupedHeaderColumnSizer.js.map +0 -1
  109. package/lib/esm/components/table/useTable.d.ts +0 -122
  110. package/lib/esm/components/table/useTable.js +0 -28
  111. package/lib/esm/components/table/useTable.js.map +0 -1
  112. package/lib/esm/components/table/useTableExport.d.ts +0 -6
  113. package/lib/esm/components/table/useTableExport.js +0 -37
  114. package/lib/esm/components/table/useTableExport.js.map +0 -1
  115. package/lib/esm/components/table/useTableState.d.ts +0 -3
  116. package/lib/esm/components/table/useTableState.js +0 -11
  117. package/lib/esm/components/table/useTableState.js.map +0 -1
  118. package/lib/esm/components/table/utils.d.ts +0 -1
  119. package/lib/esm/components/table/utils.js +0 -5
  120. package/lib/esm/components/table/utils.js.map +0 -1
  121. package/lib/esm/index.d.ts +0 -3
  122. package/lib/esm/index.js +0 -4
  123. package/lib/esm/index.js.map +0 -1
  124. package/lib/esnext/common/classes.d.ts +0 -28
  125. package/lib/esnext/common/classes.js +0 -31
  126. package/lib/esnext/common/classes.js.map +0 -1
  127. package/lib/esnext/common/index.d.ts +0 -3
  128. package/lib/esnext/common/index.js +0 -4
  129. package/lib/esnext/common/index.js.map +0 -1
  130. package/lib/esnext/components/pagination/index.d.ts +0 -1
  131. package/lib/esnext/components/pagination/index.js +0 -2
  132. package/lib/esnext/components/pagination/index.js.map +0 -1
  133. package/lib/esnext/components/pagination/pagination.d.ts +0 -46
  134. package/lib/esnext/components/pagination/pagination.js +0 -53
  135. package/lib/esnext/components/pagination/pagination.js.map +0 -1
  136. package/lib/esnext/components/table/columnFilter.d.ts +0 -7
  137. package/lib/esnext/components/table/columnFilter.js +0 -17
  138. package/lib/esnext/components/table/columnFilter.js.map +0 -1
  139. package/lib/esnext/components/table/columnHelpers.d.ts +0 -340
  140. package/lib/esnext/components/table/columnHelpers.js +0 -37
  141. package/lib/esnext/components/table/columnHelpers.js.map +0 -1
  142. package/lib/esnext/components/table/headerGroup.d.ts +0 -8
  143. package/lib/esnext/components/table/headerGroup.js +0 -44
  144. package/lib/esnext/components/table/headerGroup.js.map +0 -1
  145. package/lib/esnext/components/table/index.d.ts +0 -9
  146. package/lib/esnext/components/table/index.js +0 -10
  147. package/lib/esnext/components/table/index.js.map +0 -1
  148. package/lib/esnext/components/table/reactTableBase.d.ts +0 -2
  149. package/lib/esnext/components/table/reactTableBase.js +0 -3
  150. package/lib/esnext/components/table/reactTableBase.js.map +0 -1
  151. package/lib/esnext/components/table/table.d.ts +0 -123
  152. package/lib/esnext/components/table/table.js +0 -239
  153. package/lib/esnext/components/table/table.js.map +0 -1
  154. package/lib/esnext/components/table/tableMessages.d.ts +0 -6
  155. package/lib/esnext/components/table/tableMessages.js +0 -6
  156. package/lib/esnext/components/table/tableMessages.js.map +0 -1
  157. package/lib/esnext/components/table/theme.d.ts +0 -4
  158. package/lib/esnext/components/table/theme.js +0 -6
  159. package/lib/esnext/components/table/theme.js.map +0 -1
  160. package/lib/esnext/components/table/useAutoColumnSizer.d.ts +0 -7
  161. package/lib/esnext/components/table/useAutoColumnSizer.js +0 -47
  162. package/lib/esnext/components/table/useAutoColumnSizer.js.map +0 -1
  163. package/lib/esnext/components/table/useAutoHeight.d.ts +0 -4
  164. package/lib/esnext/components/table/useAutoHeight.js +0 -66
  165. package/lib/esnext/components/table/useAutoHeight.js.map +0 -1
  166. package/lib/esnext/components/table/useGroupedHeaderColumnSizer.d.ts +0 -2
  167. package/lib/esnext/components/table/useGroupedHeaderColumnSizer.js +0 -53
  168. package/lib/esnext/components/table/useGroupedHeaderColumnSizer.js.map +0 -1
  169. package/lib/esnext/components/table/useTable.d.ts +0 -122
  170. package/lib/esnext/components/table/useTable.js +0 -28
  171. package/lib/esnext/components/table/useTable.js.map +0 -1
  172. package/lib/esnext/components/table/useTableExport.d.ts +0 -6
  173. package/lib/esnext/components/table/useTableExport.js +0 -37
  174. package/lib/esnext/components/table/useTableExport.js.map +0 -1
  175. package/lib/esnext/components/table/useTableState.d.ts +0 -3
  176. package/lib/esnext/components/table/useTableState.js +0 -11
  177. package/lib/esnext/components/table/useTableState.js.map +0 -1
  178. package/lib/esnext/components/table/utils.d.ts +0 -1
  179. package/lib/esnext/components/table/utils.js +0 -5
  180. package/lib/esnext/components/table/utils.js.map +0 -1
  181. package/lib/esnext/index.d.ts +0 -3
  182. package/lib/esnext/index.js +0 -4
  183. package/lib/esnext/index.js.map +0 -1
@@ -1,340 +0,0 @@
1
- import React from 'react';
2
- import { type AccessorFn, type AggregationFnOption, type Column, type ColumnDef, type ColumnPinningPosition, type DeepKeys, type DeepValue, type FilterFnOption, type Getter, type Row, type RowData, type SortingFnOption, type StringHeaderIdentifier, type StringOrTemplateHeader, type Table } from './reactTableBase';
3
- export interface ColumnHelper<TData> {
4
- accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TData, TValue> : IdentifiedColumnDef<TData, TValue>) => ColumnDef<TData, TValue>;
5
- display: (column: DisplayColumnDef<TData>) => ColumnDef<TData, unknown>;
6
- group: (column: GroupColumnDef<TData>) => ColumnDef<TData, unknown>;
7
- expansion: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: ExpansionColumnDef<TData, TValue>) => ColumnDef<TData, TValue>;
8
- selection: (column?: SelectionColumnDef<TData>) => ColumnDef<TData, unknown>;
9
- }
10
- export type ColumnDefTemplate<TProps extends object> = string | ((props: TProps) => React.ReactNode);
11
- export interface CellContext<TData extends RowData, TValue> {
12
- cell: Cell<TData, TValue>;
13
- column: Column<TData, TValue>;
14
- getValue: Getter<TValue>;
15
- renderValue: Getter<TValue | null>;
16
- row: Row<TData>;
17
- table: Table<TData>;
18
- }
19
- export interface CoreCell<TData extends RowData, TValue> {
20
- /**
21
- * The associated Column object for the cell.
22
- */
23
- column: Column<TData, TValue>;
24
- /**
25
- * Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:
26
- */
27
- getContext: () => CellContext<TData, TValue>;
28
- /**
29
- * Returns the value for the cell, accessed via the associated column's accessor key or accessor function.
30
- */
31
- getValue: CellContext<TData, TValue>['getValue'];
32
- /**
33
- * The unique ID for the cell across the entire table.
34
- */
35
- id: string;
36
- /**
37
- * Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
38
- */
39
- renderValue: CellContext<TData, TValue>['renderValue'];
40
- /**
41
- * The associated Row object for the cell.
42
- */
43
- row: Row<TData>;
44
- }
45
- export interface Cell<TData extends RowData, TValue> extends CoreCell<TData, TValue>, GroupingCell {
46
- }
47
- export type GroupColumnDef<TData extends RowData, TValue = unknown> = GroupColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>;
48
- export interface GroupColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
49
- /**
50
- * The children columns of this group.
51
- */
52
- columns: Array<ColumnDef<TData, any>>;
53
- }
54
- export interface GroupingCell {
55
- /**
56
- * Returns whether or not the cell is currently aggregated.
57
- */
58
- getIsAggregated: () => boolean;
59
- /**
60
- * Returns whether or not the cell is currently grouped.
61
- */
62
- getIsGrouped: () => boolean;
63
- /**
64
- * Returns whether or not the cell is currently a placeholder cell.
65
- */
66
- getIsPlaceholder: () => boolean;
67
- }
68
- export interface HeaderContext<TData, TValue> {
69
- /**
70
- * An instance of a column.
71
- */
72
- column: Column<TData, TValue>;
73
- /**
74
- * An instance of a header.
75
- */
76
- header: Header<TData, TValue>;
77
- /**
78
- * The table instance.
79
- */
80
- table: Table<TData>;
81
- }
82
- export interface Header<TData extends RowData, TValue> extends CoreHeader<TData, TValue>, ColumnSizingHeader {
83
- }
84
- export type HeaderGroup<TData extends RowData> = CoreHeaderGroup<TData>;
85
- export interface CoreHeaderGroup<TData extends RowData> {
86
- depth: number;
87
- headers: Array<Header<TData, unknown>>;
88
- id: string;
89
- }
90
- export interface CoreHeader<TData extends RowData, TValue> {
91
- /**
92
- * The col-span for the header.
93
- */
94
- colSpan: number;
95
- /**
96
- * The header's associated column object.
97
- */
98
- column: Column<TData, TValue>;
99
- /**
100
- * The depth of the header, zero-indexed based.
101
- */
102
- depth: number;
103
- /**
104
- * Returns the rendering context (or props) for column-based components like headers, footers and filters.
105
- */
106
- getContext: () => HeaderContext<TData, TValue>;
107
- /**
108
- * Returns the leaf headers hierarchically nested under this header.
109
- */
110
- getLeafHeaders: () => Array<Header<TData, unknown>>;
111
- /**
112
- * The header's associated header group object.
113
- */
114
- headerGroup: HeaderGroup<TData>;
115
- /**
116
- * The unique identifier for the header.
117
- */
118
- id: string;
119
- /**
120
- * The index for the header within the header group.
121
- */
122
- index: number;
123
- /**
124
- * A boolean denoting if the header is a placeholder header.
125
- */
126
- isPlaceholder: boolean;
127
- /**
128
- * If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.
129
- */
130
- placeholderId?: string;
131
- /**
132
- * The row-span for the header.
133
- */
134
- rowSpan: number;
135
- /**
136
- * The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.
137
- */
138
- subHeaders: Array<Header<TData, TValue>>;
139
- }
140
- export interface Header<TData extends RowData, TValue> extends CoreHeader<TData, TValue>, ColumnSizingHeader {
141
- }
142
- export interface ColumnSizingHeader {
143
- /**
144
- * Returns an event handler function that can be used to resize the header. It can be used as an:
145
- * - `onMouseDown` handler
146
- * - `onTouchStart` handler
147
- *
148
- * The dragging and release events are automatically handled for you.
149
- */
150
- getResizeHandler: (context?: Document) => (event: unknown) => void;
151
- /**
152
- * Returns the current size of the header.
153
- */
154
- getSize: () => number;
155
- /**
156
- * Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.
157
- */
158
- getStart: (position?: ColumnPinningPosition) => number;
159
- }
160
- interface ColumnDefExtensions<TData extends RowData, TValue = unknown> extends VisibilityColumnDef, ColumnPinningColumnDef, FiltersColumnDef<TData>, SortingColumnDef<TData>, GroupingColumnDef<TData, TValue>, ColumnSizingColumnDef {
161
- }
162
- export interface ColumnSizingColumnDef {
163
- /**
164
- * Enables or disables column resizing for the column.
165
- */
166
- enableResizing?: boolean;
167
- /**
168
- * The maximum allowed size for the column
169
- */
170
- maxSize?: number;
171
- /**
172
- * The minimum allowed size for the column
173
- */
174
- minSize?: number;
175
- /**
176
- * The desired size for the column
177
- */
178
- size?: number;
179
- }
180
- export declare const SELECTION_ID = "_selection";
181
- export interface GroupingColumnDef<TData extends RowData, TValue> {
182
- /**
183
- * The cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used).
184
- */
185
- aggregatedCell?: ColumnDefTemplate<ReturnType<Cell<TData, TValue>['getContext']>>;
186
- /**
187
- * The resolved aggregation function for the column.
188
- */
189
- aggregationFn?: AggregationFnOption<TData>;
190
- /**
191
- * Enables/disables grouping for this column.
192
- */
193
- enableGrouping?: boolean;
194
- /**
195
- * Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead.
196
- */
197
- getGroupingValue?: (row: TData) => any;
198
- }
199
- export interface SortingColumnDef<TData extends RowData> {
200
- /**
201
- * Enables/Disables multi-sorting for this column.
202
- */
203
- enableMultiSort?: boolean;
204
- /**
205
- * Enables/Disables sorting for this column.
206
- */
207
- enableSorting?: boolean;
208
- /**
209
- * Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring
210
- */
211
- invertSorting?: boolean;
212
- /**
213
- * Set to `true` for sorting toggles on this column to start in the descending direction.
214
- */
215
- sortDescFirst?: boolean;
216
- /**
217
- * The sorting function to use with this column.
218
- * - A `string` referencing a built-in sorting function
219
- * - A custom sorting function
220
- */
221
- sortingFn?: SortingFnOption<TData>;
222
- /**
223
- * - `false`
224
- * - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)
225
- * - `-1`
226
- * - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
227
- * - `1`
228
- * - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
229
- */
230
- sortUndefined?: false | -1 | 1;
231
- }
232
- export interface FiltersColumnDef<TData extends RowData> {
233
- /**
234
- * The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.
235
- */
236
- filterFn?: FilterFnOption<TData>;
237
- /**
238
- * Enables/disables the **column** filter for this column.
239
- */
240
- enableColumnFilter?: boolean;
241
- /**
242
- * Enables/disables the **global** filter for this column.
243
- */
244
- enableGlobalFilter?: boolean;
245
- }
246
- export interface ColumnPinningColumnDef {
247
- /**
248
- * Enables/disables column pinning for this column. Defaults to `true`.
249
- */
250
- enablePinning?: boolean;
251
- }
252
- export interface VisibilityColumnDef {
253
- enableHiding?: boolean;
254
- }
255
- export interface ColumnFilterProps<TData, TValue> {
256
- column: Column<TData, TValue>;
257
- table: Table<TData>;
258
- }
259
- export interface ColumnDefBase<TData, TValue> extends ColumnDefExtensions<TData, TValue> {
260
- getUniqueValues?: AccessorFn<TData, unknown[]>;
261
- footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>;
262
- cell?: ColumnDefTemplate<CellContext<TData, TValue>>;
263
- filter?: (props: ColumnFilterProps<TData, TValue>) => React.ReactNode;
264
- /**
265
- * When defined, the callback can return an optional class name that will be added to the specific cell.
266
- */
267
- getClassName?: (content: CellContext<TData, TValue>) => string | null | undefined;
268
- /**
269
- * Set to `true` to skip row click when the cell is clicked.
270
- *
271
- * @default false
272
- */
273
- skipRowClick?: boolean;
274
- }
275
- export interface DisplayColumnDef<TData, TValue = unknown> extends ColumnDefBase<TData, TValue>, IdIdentifier<TData, TValue> {
276
- }
277
- export interface ExpansionColumnDef<TData, TValue = unknown> extends DisplayColumnDef<TData, TValue> {
278
- /**
279
- * When row depth is not 0 and not expandable, a left padding is added to the cell for alignment with
280
- * parent row.
281
- *
282
- * @default false
283
- */
284
- alwaysIncludeDepthPadding?: boolean;
285
- }
286
- export interface IdentifiedColumnDef<TData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
287
- id?: string;
288
- header?: StringOrTemplateHeader<TData, TValue>;
289
- }
290
- type ColumnIdentifiers<TData extends RowData, TValue> = IdIdentifier<TData, TValue> | StringHeaderIdentifier;
291
- export interface IdIdentifier<TData extends RowData, TValue> {
292
- id: string;
293
- header?: StringOrTemplateHeader<TData, TValue>;
294
- }
295
- export type SelectionColumnDef<TData> = Omit<DisplayColumnDef<TData>, 'id' | 'cell' | 'header'>;
296
- /**
297
- * Configuration for the table’s column utility popover (export/visibility/reorder/search).
298
- */
299
- export type ColumnUtilityProps = {
300
- /**
301
- * Show the **Export** actions inside the utility panel.
302
- * Use when users should be able to export the current table view (CSV/XLSX/etc).
303
- *
304
- * @default false
305
- */
306
- showExport?: boolean;
307
- /**
308
- * Show the **Column Visibility** manager to show/hide columns.
309
- * When enabled, users can toggle column visibility via checkboxes.
310
- *
311
- * @default true
312
- */
313
- showColumnVisibility?: boolean;
314
- /**
315
- * Allow **Column Reorder** in the manager (drag to rearrange).
316
- * When disabled, the list is static and drag handles are hidden.
317
- *
318
- * @default true
319
- */
320
- canColumnReorder?: boolean;
321
- /**
322
- * Enable **Search** within the column list (filters by header/ID).
323
- * Helpful for wide tables with many columns.
324
- *
325
- * @default true
326
- */
327
- canColumnSearch?: boolean;
328
- /**
329
- * If true, the Column Utility shows each column's **id** as the label.
330
- * If false (default), it tries to show the column's header text.
331
- *
332
- * Useful when headers are complex React nodes or localized at render-time,
333
- * and you prefer a stable technical label in the manager.
334
- *
335
- * @default false
336
- */
337
- useIdAsLabel?: boolean;
338
- };
339
- export declare function createColumnHelper<TData>(): ColumnHelper<TData>;
340
- export {};
@@ -1,37 +0,0 @@
1
- import { Checkbox, Colors } from '@blueprintjs/core';
2
- import { CaretDown, CaretRight } from '@blueprintjs/icons';
3
- import React from 'react';
4
- import { Classes } from '../../common';
5
- import { createColumnHelper as createColumnHelperBase } from './reactTableBase';
6
- export const SELECTION_ID = '_selection';
7
- export function createColumnHelper() {
8
- const base = createColumnHelperBase();
9
- return {
10
- ...base,
11
- expansion(accessor, column) {
12
- return base.accessor(accessor, {
13
- ...column,
14
- cell: (props) => (React.createElement("span", { className: Classes.REACT_TABLE_ROW_EXPANDER_WRAPPER, style: { paddingLeft: props.row.depth * 25 } },
15
- props.row.getCanExpand() ? (React.createElement("span", { className: Classes.REACT_TABLE_ROW_EXPANDER, onClick: props.row.getToggleExpandedHandler(), "data-skip-row-click": true }, props.row.getIsExpanded() ? (React.createElement(CaretDown, { size: 18, color: Colors.BLUE1 })) : (React.createElement(CaretRight, { size: 18, color: Colors.BLUE1 })))) : column.alwaysIncludeDepthPadding ? (React.createElement("span", { style: { paddingLeft: 25 } })) : null,
16
- React.createElement("span", null, typeof column.cell === 'string'
17
- ? column.cell
18
- : typeof column.cell === 'function'
19
- ? column.cell(props)
20
- : props.renderValue())))
21
- }); // eslint-disable-line @typescript-eslint/no-explicit-any
22
- },
23
- selection(column) {
24
- return {
25
- ...column,
26
- cell: ({ row }) => (React.createElement(Checkbox, { className: Classes.REACT_TABLE_SELECTION, checked: row.getIsSelected(), disabled: !row.getCanSelect(), indeterminate: row.getIsSomeSelected(), onChange: row.getToggleSelectedHandler() })),
27
- enableResizing: false,
28
- enableSorting: false,
29
- header: ({ table }) => (React.createElement(Checkbox, { className: Classes.REACT_TABLE_SELECTION, checked: table.getIsAllRowsSelected(), disabled: table.options.enableRowSelection === false, indeterminate: table.getIsSomeRowsSelected(), onChange: table.getToggleAllRowsSelectedHandler() })),
30
- id: SELECTION_ID,
31
- size: 20,
32
- skipRowClick: true
33
- };
34
- }
35
- };
36
- }
37
- //# sourceMappingURL=columnHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"columnHelpers.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/columnHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAMH,kBAAkB,IAAI,sBAAsB,EAW/C,MAAM,kBAAkB,CAAC;AAwO1B,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AAuLzC,MAAM,UAAU,kBAAkB;IAC9B,MAAM,IAAI,GAAG,sBAAsB,EAAS,CAAC;IAC7C,OAAO;QACH,GAAG,IAAI;QACP,SAAS,CAAC,QAAQ,EAAE,MAAM;YACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;gBAC3B,GAAG,MAAM;gBACT,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CACb,8BACI,SAAS,EAAE,OAAO,CAAC,gCAAgC,EACnD,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE;oBAC3C,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CACxB,8BACI,SAAS,EAAE,OAAO,CAAC,wBAAwB,EAC3C,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,wBAAwB,EAAE,yBACxB,IAAI,IACxB,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,C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BAAoB,EAAE,EACrC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,KAAK,KAAK,EACpD,aAAa,EAAE,KAAK,CAAC,qBAAqB,EAAE,EAC5C,QAAQ,EAAE,KAAK,CAAC,+BAA+B,EAAE,GACnD,CACL;gBACD,EAAE,EAAE,YAAY;gBAChB,IAAI,EAAE,EAAE;gBACR,YAAY,EAAE,IAAI;aACrB,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { type HeaderGroup, type Table } from './reactTableBase';
3
- interface HeaderGroupProps<TData = unknown> {
4
- table: Table<TData>;
5
- headerGroup: HeaderGroup<TData>;
6
- }
7
- export declare const HeaderGroupWrapper: React.FC<HeaderGroupProps>;
8
- export {};
@@ -1,44 +0,0 @@
1
- import { SortAsc, SortDesc } from '@blueprintjs/icons';
2
- import React from 'react';
3
- import { Classes } from '../../common';
4
- import { ColumnFilter } from './columnFilter';
5
- import { flexRender } from './reactTableBase';
6
- const LEAF_MIN_TOTAL_WIDTH_PX = 41; // expected total leaf width incl. padding + border
7
- const COLUMN_BORDER_PX = 1;
8
- const stopPropagation = (e) => e.stopPropagation();
9
- const getHeaderMinWidth = (header) => {
10
- if (header.isPlaceholder)
11
- return 0;
12
- if (header.subHeaders != null && header.subHeaders.length > 0) {
13
- const childrenMin = header.subHeaders.reduce((sum, subHeader) => sum + getHeaderMinWidth(subHeader), 0);
14
- return childrenMin + COLUMN_BORDER_PX;
15
- }
16
- return header.column.columnDef.minSize ?? LEAF_MIN_TOTAL_WIDTH_PX;
17
- };
18
- export const HeaderGroupWrapper = function HeaderGroup(props) {
19
- return (React.createElement("div", { className: Classes.REACT_TABLE_ROW }, props.headerGroup.headers.map((header) => header.isPlaceholder ? (React.createElement("div", { key: header.id, className: Classes.REACT_TABLE_HEAD_CELL, style: { width: `calc(var(--header-${header?.id}-size) * 1px)` } })) : (React.createElement("div", { key: header.id, className: Classes.REACT_TABLE_HEAD_CELL, "data-sortable": header.column.getCanSort(), "data-has-filter": header.column.getCanFilter(), style: {
20
- display: 'grid',
21
- gridTemplateRows: header.column.getCanFilter() ? 'auto auto' : 'auto',
22
- justifyContent: header.subHeaders && header.subHeaders.length > 0
23
- ? 'center'
24
- : undefined,
25
- minWidth: `${getHeaderMinWidth(header)}px`,
26
- rowGap: 4,
27
- textAlign: header.subHeaders && header.subHeaders.length > 0
28
- ? 'center'
29
- : 'left',
30
- width: `calc(var(--header-${header?.id}-size) * 1px)`
31
- }, onClick: header.column.getToggleSortingHandler() },
32
- React.createElement("div", { className: Classes.REACT_TABLE_HEAD_CELL_CONTENT, style: { display: 'flex', gap: 4 } },
33
- React.createElement("span", { className: Classes.REACT_TABLE_HEAD_CELL_CONTENT_LABEL, "data-ellipsize": "false" }, flexRender(header.column.columnDef.header, header.getContext())),
34
- header.column.getCanSort() && (React.createElement("span", { className: Classes.REACT_TABLE_SORTING }, {
35
- asc: React.createElement(SortAsc, { size: 16 }),
36
- desc: React.createElement(SortDesc, { size: 16 })
37
- }[header.column.getIsSorted()] ?? null))),
38
- header.column.getCanResize() && (React.createElement("div", { onDoubleClick: () => header.column.resetSize(), onClick: stopPropagation, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), className: Classes.REACT_TABLE_RESIZER, "data-resizing": header.column.getIsResizing() })),
39
- header.column.getCanFilter() && (React.createElement("div", { className: Classes.REACT_TABLE_HEAD_FILTER, "data-can-resize": header.column.getCanResize(), onClick: stopPropagation, style: {
40
- width: `calc(var(--header-${header.id}-size) * 1px - 20px)`
41
- } },
42
- React.createElement(ColumnFilter, { table: props.table, column: header.column }))))))));
43
- };
44
- //# sourceMappingURL=headerGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"headerGroup.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/headerGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC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BACG,GAAG,EAAE,oBAAC,OAAO,IAAC,IAAI,EAAE,EAAE,GAAI;gBAC1B,IAAI,EAAE,oBAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI;aAC/B,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAY,CAAC,IAAI,IAAI,CAC7C,CACV,CACC;QACL,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAC7B,6BACI,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,EAC9C,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,EACtC,YAAY,EAAE,MAAM,CAAC,gBAAgB,EAAE,EACvC,SAAS,EAAE,OAAO,CAAC,mBAAmB,mBACvB,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,GAC9C,CACL;QACA,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAC7B,6BACI,SAAS,EAAE,OAAO,CAAC,uBAAuB,qBACzB,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAC7C,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE;gBACH,KAAK,EAAE,qBAAqB,MAAM,CAAC,EAAE,sBAAsB;aAC9D;YACD,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAI,CACzD,CACT,CACC,CACT,CACJ,CACC,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export * from './reactTableBase';
2
- export { type Table as TableAPI } from './reactTableBase';
3
- export { TableTheme } from './theme';
4
- export { Table, type TableProps, type TypedTable } from './table';
5
- export { createColumnHelper, type ColumnHelper, type SelectionColumnDef, type IdIdentifier, type IdentifiedColumnDef, type DisplayColumnDef, type GroupColumnDef, type GroupColumnDefBase, type ColumnDefTemplate, type CellContext, type HeaderContext, type ColumnFilterProps, type ColumnUtilityProps } from './columnHelpers';
6
- export { useTable, type UseTableOptions } from './useTable';
7
- export { useTableExport, type TableExport } from './useTableExport';
8
- export * from './useTableState';
9
- export { TableMessagesContext, useTableMessages, type TableMessages } from './tableMessages';
@@ -1,10 +0,0 @@
1
- export * from './reactTableBase';
2
- export {} from './reactTableBase';
3
- export { TableTheme } from './theme';
4
- export { Table } from './table';
5
- export { createColumnHelper } from './columnHelpers';
6
- export { useTable } from './useTable';
7
- export { useTableExport } from './useTableExport';
8
- export * from './useTableState';
9
- export { TableMessagesContext, useTableMessages } from './tableMessages';
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAA0B,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAoC,MAAM,SAAS,CAAC;AAClE,OAAO,EACH,kBAAkB,EAarB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAwB,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAoB,MAAM,kBAAkB,CAAC;AACpE,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAsB,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from '@tanstack/table-core';
2
- export { flexRender, type Header } from '@tanstack/react-table';
@@ -1,3 +0,0 @@
1
- export * from '@tanstack/table-core';
2
- export { flexRender } from '@tanstack/react-table';
3
- //# sourceMappingURL=reactTableBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reactTableBase.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/reactTableBase.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAe,MAAM,uBAAuB,CAAC"}
@@ -1,123 +0,0 @@
1
- import { type Elevation, type MaybeElement, type Props } from '@blueprintjs/core';
2
- import { type IconName } from '@blueprintjs/icons';
3
- import * as React from 'react';
4
- import { type Table as TableAPI } from './reactTableBase';
5
- import { TableTheme } from './theme';
6
- export interface TypedTable extends React.FC<TableProps> {
7
- ofType<T>(): React.FC<TableProps<T>>;
8
- }
9
- export interface TableProps<T = unknown> extends Props {
10
- /**
11
- * The table instance created using `useTable`. See the type `UseTableOptions`, as `data` and `columns` are provided to the hook.
12
- */
13
- table: TableAPI<T>;
14
- /**
15
- * Set to adjust the table theme.
16
- *
17
- * @default TableTheme.Standard
18
- */
19
- theme?: TableTheme;
20
- /**
21
- * Controls the intensity of the drop shadow beneath the table: the higher
22
- * the elevation, the higher the drop shadow. Only valid for `TableTheme.Standard`.
23
- * Set to `-1` to disable border and drop shadow.
24
- *
25
- * @default 2
26
- */
27
- elevation?: Elevation | -1;
28
- /**
29
- * Set to `false` to hide the table header.
30
- *
31
- * @default true
32
- */
33
- displayHeader?: boolean;
34
- /**
35
- * Set to `false` to hide the table pagination.
36
- *
37
- * @default true
38
- */
39
- displayPagination?: boolean;
40
- /**
41
- * Optional icon for the empty table non-ideal state.
42
- *
43
- * @default Icons.Table
44
- */
45
- noResultsIcon?: IconName | MaybeElement;
46
- /**
47
- * Optional title text for the empty table non-ideal state.
48
- *
49
- * @default "No results available"
50
- */
51
- noResultsTitle?: React.ReactNode;
52
- /**
53
- * Optional description for the empty table non-ideal state.
54
- */
55
- noResultsDescription?: React.ReactChild;
56
- /**
57
- * Optional action for the empty table non-ideal state.
58
- */
59
- noResultsActions?: React.JSX.Element;
60
- /**
61
- * Optional element to display in the left area of the top toolbar.
62
- */
63
- leftToolbar?: React.ReactNode;
64
- /**
65
- * Optional element to display in the right area of the top toolbar, to the left of the global filter, if enabled.
66
- */
67
- rightToolbar?: React.ReactNode;
68
- /**
69
- * Set a tuple with `[minPageSize, maxPageSize]` to automatically set page size based on the parent height.
70
- */
71
- autoHeight?: [minPageSize: number, maxPageSize: number];
72
- /**
73
- * Set the parent height property with the value to be used for auto-height calculation.
74
- * If not provided, it will use the height of the parent element.
75
- */
76
- autoHeightParentHeight?: number;
77
- /**
78
- * The maximum number of pixels that the auto-height should use for the table parent.
79
- * When not set, it can grow unbounded up to the maximum page size.
80
- */
81
- autoHeightMaxHeight?: number;
82
- /**
83
- * When `autoHeight` is set and this value is not provided, it is automatically calculated. Set a value to disable automatic
84
- * calculation of average row height.
85
- */
86
- autoHeightAverageRowHeight?: number;
87
- /**
88
- * When set to true, every change to row or cell height will be tracked. Only useful of the height can be altered dynamically.
89
- *
90
- * @default false
91
- */
92
- autoHeightObserveRows?: boolean;
93
- /**
94
- * Set to `false` to remove ellipsis of values that do not fit cell width.
95
- * Property is only in effect for the `TableTheme.Segment`.
96
- *
97
- * @default true
98
- */
99
- ellipsize?: boolean;
100
- /**
101
- * Enables manual control of the table's page size.
102
- * When `true`, a page-size control is rendered in the pagination footer.
103
- *
104
- * @default true
105
- */
106
- manualPageSizeVisible?: boolean;
107
- /**
108
- * Optional list of page-size options displayed in the Select.
109
- *
110
- * If omitted, the default list will be used:
111
- * `[10, 30, 50, 100]`
112
- *
113
- * When `autoHeight` is enabled on the table, an additional
114
- * `"Auto"` option is prepended that disables manual page size.
115
- *
116
- * PERFORMANCE NOTE:
117
- * This array should be memoized to prevent
118
- * unnecessary recalculations and to ensure stable references in React.
119
- */
120
- manualPageSizeOptions?: number[];
121
- }
122
- declare const Table: TypedTable;
123
- export { Table };